summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGabda <gabda87@gmail.com>2019-03-02 10:50:50 +0100
committerNiels Martin Hansen <nielsm@indvikleren.dk>2019-03-09 01:05:47 +0100
commit4be2c1022e8576f139035ba41cdae97cf3799f5c (patch)
treeaf20d3c391b60a20fa928d91e69f1a6431112a18 /src
parent6c6971fb43514c4e4923c2ec3b1fdd9fe852617d (diff)
downloadopenttd-4be2c1022e8576f139035ba41cdae97cf3799f5c.tar.xz
Cleanup: changing variable names in TIC() and TOC()
Removing double underscores to be ANSI-C standard compliant.
Diffstat (limited to 'src')
-rw-r--r--src/debug.h14
1 files 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;\
}\
}