# HG changeset patch
# User KUDr
# Date 1174333946 0
# Node ID 324dad59eb3515ae97a59194d3bfda7919822b9e
# Parent 4a2d75b6078623b2f8b939bf2fab45f3bf4b4923
(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)
diff -r 4a2d75b60786 -r 324dad59eb35 projects/openttd.vcproj
--- 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">
+
+
+
+
diff -r 4a2d75b60786 -r 324dad59eb35 src/cargotype.h
--- 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;
}
diff -r 4a2d75b60786 -r 324dad59eb35 src/fixedt.h
--- 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 */
diff -r 4a2d75b60786 -r 324dad59eb35 src/town_gui.cpp
--- 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;