(svn r6411) -Fix(r6410): forgot to update openttd*.sln (thx Darkvater and michi_cc :) )
authorglx
Wed, 06 Sep 2006 14:24:43 +0000
changeset 4563 f25cb91c5f14
parent 4562 b22bb637406f
child 4564 c0ddf49f322f
(svn r6411) -Fix(r6410): forgot to update openttd*.sln (thx Darkvater and michi_cc :) )
-Cleanup: Removed UNITTEST preprocessor checks
openttd.sln
openttd_vs80.sln
stdafx.h
yapf/yapf.hpp
yapf/yapf_base.hpp
--- a/openttd.sln	Wed Sep 06 13:58:31 2006 +0000
+++ b/openttd.sln	Wed Sep 06 14:24:43 2006 +0000
@@ -14,10 +14,6 @@
 		{A133A442-BD0A-4ADE-B117-AD7545E4BDD1} = {A133A442-BD0A-4ADE-B117-AD7545E4BDD1}
 	EndProjectSection
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unittest", "yapf\unittest\unittest.vcproj", "{4AECBDC3-D57E-4AFB-90BD-DDF10707588C}"
-	ProjectSection(ProjectDependencies) = postProject
-	EndProjectSection
-EndProject
 Global
 	GlobalSection(SolutionConfiguration) = preSolution
 		Debug = Debug
--- a/openttd_vs80.sln	Wed Sep 06 13:58:31 2006 +0000
+++ b/openttd_vs80.sln	Wed Sep 06 14:24:43 2006 +0000
@@ -13,8 +13,6 @@
 		{A133A442-BD0A-4ADE-B117-AD7545E4BDD1} = {A133A442-BD0A-4ADE-B117-AD7545E4BDD1}
 	EndProjectSection
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unittest", "yapf\unittest\unittest_vs80.vcproj", "{4AECBDC3-D57E-4AFB-90BD-DDF10707588C}"
-EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Win32 = Debug|Win32
--- a/stdafx.h	Wed Sep 06 13:58:31 2006 +0000
+++ b/stdafx.h	Wed Sep 06 14:24:43 2006 +0000
@@ -166,7 +166,7 @@
 # define TTD_LITTLE_ENDIAN
 #else
 // Else include endian[target/host].h, which has the endian-type, autodetected by the Makefile
-# if defined(STRGEN) || defined(UNITTEST)
+# if defined(STRGEN)
 #  include "endian_host.h"
 # else
 #  include "endian_target.h"
--- a/yapf/yapf.hpp	Wed Sep 06 13:58:31 2006 +0000
+++ b/yapf/yapf.hpp	Wed Sep 06 14:24:43 2006 +0000
@@ -49,28 +49,8 @@
 	FORCEINLINE void Stop() {m_acc += QueryTime() - m_start;}
 	FORCEINLINE int Get(int64 coef) {return (int)(m_acc * coef / QueryFrequency());}
 
-#if !defined(UNITTEST) && 1
 	FORCEINLINE int64 QueryTime() {return _rdtsc();}
 	FORCEINLINE int64 QueryFrequency() {return ((int64)2200 * 1000000);}
-#elif defined(_WIN32) || defined(_WIN64)
-	FORCEINLINE int64 QueryTime() {LARGE_INTEGER c; QueryPerformanceCounter(&c); return c.QuadPart;}
-	FORCEINLINE int64 QueryFrequency() {LARGE_INTEGER f; QueryPerformanceFrequency(&f); return f.QuadPart;}
-#elif defined(CLOCK_THREAD_CPUTIME_ID)
-	FORCEINLINE int64 QueryTime()
-	{
-		timespec ts;
-		int ret = clock_gettime(CLOCK_THREAD_CPUTIME_ID, &ts);
-		if (ret != 0) return 0;
-		return (ts.tv_sec * 1000000000LL) + ts.tv_nsec;
-	}
-	FORCEINLINE int64 QueryFrequency()
-	{
-		return 1000000000;
-	}
-#else
-	int64 QueryTime() {return 0;}
-	int64 QueryFrequency() {return 1;}
-#endif
 };
 
 struct CPerfStartReal
--- a/yapf/yapf_base.hpp	Wed Sep 06 13:58:31 2006 +0000
+++ b/yapf/yapf_base.hpp	Wed Sep 06 14:24:43 2006 +0000
@@ -76,13 +76,8 @@
 	FORCEINLINE CYapfBaseT()
 		: m_pBestDestNode(NULL)
 		, m_pBestIntermediateNode(NULL)
-#if defined(UNITTEST)
-		, m_settings(NULL)
-		, m_max_search_nodes(100000)
-#else
 		, m_settings(&_patches.yapf)
 		, m_max_search_nodes(PfGetSettings().max_search_nodes)
-#endif
 		, m_veh(NULL)
 		, m_stats_cost_calcs(0)
 		, m_stats_cache_hits(0)
@@ -151,11 +146,7 @@
 		float cache_hit_ratio = (float)m_stats_cache_hits / (float)(m_stats_cache_hits + m_stats_cost_calcs) * 100.0f;
 		int cost = bDestFound ? m_pBestDestNode->m_cost : -1;
 		int dist = bDestFound ? m_pBestDestNode->m_estimate - m_pBestDestNode->m_cost : -1;
-#ifdef UNITTEST
-		printf("%c%c%4d-%6d us -%5d rounds -%4d open -%5d closed - CHR %4.1f%% - c/d(%d, %d) - c%d(sc%d, ts%d, o%d) -- \n", bDestFound ? '-' : '!', ttc, veh_idx, t, m_num_steps, m_nodes.OpenCount(), m_nodes.ClosedCount(), cache_hit_ratio, cost, dist, m_perf_cost.Get(1000000), m_perf_slope_cost.Get(1000000), m_perf_ts_cost.Get(1000000), m_perf_other_cost.Get(1000000));
-#else
 		DEBUG(yapf, 3)("[YAPF][YAPF%c]%c%4d- %d us - %d rounds - %d open - %d closed - CHR %4.1f%% - c%d(sc%d, ts%d, o%d) -- ", ttc, bDestFound ? '-' : '!', veh_idx, t, m_num_steps, m_nodes.OpenCount(), m_nodes.ClosedCount(), cache_hit_ratio, cost, dist, m_perf_cost.Get(1000000), m_perf_slope_cost.Get(1000000), m_perf_ts_cost.Get(1000000), m_perf_other_cost.Get(1000000));
-#endif
 		return bDestFound;
 	}