(svn r3008) [ 1247535 ] Native Support for Win64 (compile&run only) (michi_cc)

Fix warning in graph_gui.c with const problem
This commit is contained in:
Darkvater
2005-10-02 22:39:56 +00:00
parent e8fac6c6cb
commit a3d40a29fc
13 changed files with 127 additions and 24 deletions

View File

@@ -1943,7 +1943,7 @@ static const byte _search_directions[6][4] = {
static const byte _pick_track_table[6] = {1, 3, 2, 2, 0, 0};
#if PF_BENCHMARK
#if !defined(_MSC_VER)
unsigned int rdtsc()
unsigned int _rdtsc()
{
unsigned int high, low;
@@ -1951,7 +1951,8 @@ unsigned int rdtsc()
return low;
}
#else
static unsigned int _declspec(naked) rdtsc(void)
#ifndef _M_AMD64
static unsigned int _declspec(naked) _rdtsc(void)
{
_asm {
rdtsc
@@ -1960,6 +1961,7 @@ static unsigned int _declspec(naked) rdtsc(void)
}
#endif
#endif
#endif
@@ -1969,7 +1971,7 @@ static byte ChooseTrainTrack(Vehicle *v, TileIndex tile, int enterdir, TrackdirB
TrainTrackFollowerData fd;
uint best_track;
#if PF_BENCHMARK
int time = rdtsc();
int time = _rdtsc();
static float f;
#endif
@@ -2040,7 +2042,7 @@ static byte ChooseTrainTrack(Vehicle *v, TileIndex tile, int enterdir, TrackdirB
}
#if PF_BENCHMARK
time = rdtsc() - time;
time = _rdtsc() - time;
f = f * 0.99 + 0.01 * time;
printf("PF time = %d %f\n", time, f);
#endif