diff options
author | Patric Stout <truebrain@openttd.org> | 2021-04-30 11:57:37 +0200 |
---|---|---|
committer | Patric Stout <github@truebrain.nl> | 2021-04-30 12:48:41 +0200 |
commit | 665a3928e2f07e6ee1faed1c8b08fe3a68fbc37a (patch) | |
tree | 8cd661bfeeddb5a618a2c22519f2b3d89507dfbb /src/pathfinder/follow_track.hpp | |
parent | e162aff7a3d1dfcde1a9d02780235c617b6d4983 (diff) | |
download | openttd-665a3928e2f07e6ee1faed1c8b08fe3a68fbc37a.tar.xz |
Remove: performance measurements in YAPF
YAPF was constantly measuring its performance, but only at
certain debug-levels this information was shown.
Now after years, I sincerely wonder if anyone still knows about this
feature and who still use it. Especially with the new framerate window,
this detailed performance is not as meaningful anymore as it once
was.
Diffstat (limited to 'src/pathfinder/follow_track.hpp')
-rw-r--r-- | src/pathfinder/follow_track.hpp | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/pathfinder/follow_track.hpp b/src/pathfinder/follow_track.hpp index 9b95578fd..7e5e0e39b 100644 --- a/src/pathfinder/follow_track.hpp +++ b/src/pathfinder/follow_track.hpp @@ -18,7 +18,6 @@ #include "../tunnelbridge_map.h" #include "../depot_map.h" #include "pathfinder_func.h" -#include "pf_performance_timer.hpp" /** * Track follower helper template class (can serve pathfinders and vehicle @@ -49,34 +48,32 @@ struct CFollowTrackT bool m_is_station; ///< last turn passed station int m_tiles_skipped; ///< number of skipped tunnel or station tiles ErrorCode m_err; - CPerformanceTimer *m_pPerf; RailTypes m_railtypes; - inline CFollowTrackT(const VehicleType *v = nullptr, RailTypes railtype_override = INVALID_RAILTYPES, CPerformanceTimer *pPerf = nullptr) + inline CFollowTrackT(const VehicleType *v = nullptr, RailTypes railtype_override = INVALID_RAILTYPES) { - Init(v, railtype_override, pPerf); + Init(v, railtype_override); } - inline CFollowTrackT(Owner o, RailTypes railtype_override = INVALID_RAILTYPES, CPerformanceTimer *pPerf = nullptr) + inline CFollowTrackT(Owner o, RailTypes railtype_override = INVALID_RAILTYPES) { assert(IsRailTT()); m_veh = nullptr; - Init(o, railtype_override, pPerf); + Init(o, railtype_override); } - inline void Init(const VehicleType *v, RailTypes railtype_override, CPerformanceTimer *pPerf) + inline void Init(const VehicleType *v, RailTypes railtype_override) { assert(!IsRailTT() || (v != nullptr && v->type == VEH_TRAIN)); m_veh = v; - Init(v != nullptr ? v->owner : INVALID_OWNER, IsRailTT() && railtype_override == INVALID_RAILTYPES ? Train::From(v)->compatible_railtypes : railtype_override, pPerf); + Init(v != nullptr ? v->owner : INVALID_OWNER, IsRailTT() && railtype_override == INVALID_RAILTYPES ? Train::From(v)->compatible_railtypes : railtype_override); } - inline void Init(Owner o, RailTypes railtype_override, CPerformanceTimer *pPerf) + inline void Init(Owner o, RailTypes railtype_override) { assert(!IsRoadTT() || m_veh != nullptr); assert(!IsRailTT() || railtype_override != INVALID_RAILTYPES); m_veh_owner = o; - m_pPerf = pPerf; /* don't worry, all is inlined so compiler should remove unnecessary initializations */ m_old_tile = INVALID_TILE; m_old_td = INVALID_TRACKDIR; @@ -237,7 +234,6 @@ protected: /** stores track status (available trackdirs) for the new tile into m_new_td_bits */ inline bool QueryNewTileTrackStatus() { - CPerfStart perf(*m_pPerf); if (IsRailTT() && IsPlainRailTile(m_new_tile)) { m_new_td_bits = (TrackdirBits)(GetTrackBits(m_new_tile) * 0x101); } else if (IsRoadTT()) { |