summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2005-12-14 09:15:06 +0000
committerpeter1138 <peter1138@openttd.org>2005-12-14 09:15:06 +0000
commitf6330faead7f8a94446048bb5ccc6a5b527c4fd3 (patch)
tree69fb49e94a273fe8e0b32ab084c3cad7c5bbd5aa
parentec274769b93bd64f6176818c774320c6d163febc (diff)
downloadopenttd-f6330faead7f8a94446048bb5ccc6a5b527c4fd3.tar.xz
(svn r3303) Change #if PF_BENCHMARK to #ifdef PF_BENCHMARK
-rw-r--r--train_cmd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/train_cmd.c b/train_cmd.c
index faae38584..c3d64385b 100644
--- a/train_cmd.c
+++ b/train_cmd.c
@@ -2159,7 +2159,7 @@ static const byte _search_directions[6][4] = {
};
static const byte _pick_track_table[6] = {1, 3, 2, 2, 0, 0};
-#if PF_BENCHMARK
+#ifdef PF_BENCHMARK
#if !defined(_MSC_VER)
unsigned int _rdtsc()
{
@@ -2188,7 +2188,7 @@ static byte ChooseTrainTrack(Vehicle *v, TileIndex tile, int enterdir, TrackdirB
{
TrainTrackFollowerData fd;
uint best_track;
-#if PF_BENCHMARK
+#ifdef PF_BENCHMARK
int time = _rdtsc();
static float f;
#endif
@@ -2259,7 +2259,7 @@ static byte ChooseTrainTrack(Vehicle *v, TileIndex tile, int enterdir, TrackdirB
}
}
-#if PF_BENCHMARK
+#ifdef PF_BENCHMARK
time = _rdtsc() - time;
f = f * 0.99 + 0.01 * time;
printf("PF time = %d %f\n", time, f);