From 4be2c1022e8576f139035ba41cdae97cf3799f5c Mon Sep 17 00:00:00 2001 From: Gabda Date: Sat, 2 Mar 2019 10:50:50 +0100 Subject: Cleanup: changing variable names in TIC() and TOC() Removing double underscores to be ANSI-C standard compliant. --- src/debug.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/debug.h b/src/debug.h index ce454c962..1eaa20868 100644 --- a/src/debug.h +++ b/src/debug.h @@ -86,15 +86,15 @@ const char *GetDebugString(); **/ #define TIC() {\ uint64 _xxx_ = ottd_rdtsc();\ - static uint64 __sum__ = 0;\ - static uint32 __i__ = 0; + static uint64 _sum_ = 0;\ + static uint32 _i_ = 0; #define TOC(str, count)\ - __sum__ += ottd_rdtsc() - _xxx_;\ - if (++__i__ == count) {\ - DEBUG(misc, 0, "[%s] " OTTD_PRINTF64 " [avg: %.1f]", str, __sum__, __sum__/(double)__i__);\ - __i__ = 0;\ - __sum__ = 0;\ + _sum_ += ottd_rdtsc() - _xxx_;\ + if (++_i_ == count) {\ + DEBUG(misc, 0, "[%s] " OTTD_PRINTF64 " [avg: %.1f]", str, _sum_, _sum_/(double)_i_);\ + _i_ = 0;\ + _sum_ = 0;\ }\ } -- cgit v1.2.3-54-g00ecf