(svn r9346) [gamebalance] -Fix: some MSVC fatal warnings (unary minus on unsigned, forcing int to bool), and errors (missing CDECL, missing file in MSVC projects) gamebalance
authorKUDr
Mon, 19 Mar 2007 19:52:26 +0000
branchgamebalance
changeset 9898 324dad59eb35
parent 9897 4a2d75b60786
child 9899 cde52f745560
(svn r9346) [gamebalance] -Fix: some MSVC fatal warnings (unary minus on unsigned, forcing int to bool), and errors (missing CDECL, missing file in MSVC projects)
projects/openttd.vcproj
projects/openttd_vs80.vcproj
src/cargotype.h
src/fixedt.h
src/town_gui.cpp
--- a/projects/openttd.vcproj	Mon Mar 19 14:05:08 2007 +0000
+++ b/projects/openttd.vcproj	Mon Mar 19 19:52:26 2007 +0000
@@ -209,6 +209,9 @@
 				RelativePath=".\..\src\economy.cpp">
 			</File>
 			<File
+				RelativePath=".\..\src\economy_new.cpp">
+			</File>
+			<File
 				RelativePath=".\..\src\elrail.cpp">
 			</File>
 			<File
--- a/projects/openttd_vs80.vcproj	Mon Mar 19 14:05:08 2007 +0000
+++ b/projects/openttd_vs80.vcproj	Mon Mar 19 19:52:26 2007 +0000
@@ -448,11 +448,11 @@
 				>
 			</File>
 			<File
-				RelativePath=".\..\src\autoreplace_cmd.cpp"
+				RelativePath=".\..\src\aystar.cpp"
 				>
 			</File>
 			<File
-				RelativePath=".\..\src\aystar.cpp"
+				RelativePath=".\..\src\autoreplace_cmd.cpp"
 				>
 			</File>
 			<File
@@ -508,6 +508,10 @@
 				>
 			</File>
 			<File
+				RelativePath=".\..\src\economy_new.cpp"
+				>
+			</File>
+			<File
 				RelativePath=".\..\src\elrail.cpp"
 				>
 			</File>
--- a/src/cargotype.h	Mon Mar 19 14:05:08 2007 +0000
+++ b/src/cargotype.h	Mon Mar 19 19:52:26 2007 +0000
@@ -59,7 +59,7 @@
 
 static inline bool IsCargoInClass(CargoID c, uint16 cc)
 {
-	return GetCargo(c)->classes & cc;
+	return (GetCargo(c)->classes & cc) != 0;
 }
 
 
--- a/src/fixedt.h	Mon Mar 19 14:05:08 2007 +0000
+++ b/src/fixedt.h	Mon Mar 19 19:52:26 2007 +0000
@@ -76,10 +76,10 @@
 
 private:
 	/** The largest number we can hold */
-	static const int64 m_maximum = +(1ULL << ((sizeof(Tstorage) * 8) - Tdec_bits - 1)) - 1;
+	static const int64 m_maximum = +(1LL << ((sizeof(Tstorage) * 8) - Tdec_bits - 1)) - 1;
 
 	/** The smallest number we can hold */
-	static const int64 m_minimum = -(1ULL << ((sizeof(Tstorage) * 8) - Tdec_bits - 1)) - 0;
+	static const int64 m_minimum = -(1LL << ((sizeof(Tstorage) * 8) - Tdec_bits - 1)) - 0;
 };
 
 /* forward-declare some structs */
--- a/src/town_gui.cpp	Mon Mar 19 14:05:08 2007 +0000
+++ b/src/town_gui.cpp	Mon Mar 19 19:52:26 2007 +0000
@@ -435,7 +435,7 @@
 static void MakeSortedTownList()
 {
 	const Town* t;
-	int (*townsortproc[])(const void *a, const void *b) = {
+	int (CDECL *townsortproc[])(const void *a, const void *b) = {
 		TownNameSorter, TownPopSorter, TownGDPSorter, TownOutputSorter
 	};
 	uint n = 0;