From: James Turner Date: Tue, 24 Mar 2015 16:05:57 +0000 (-0500) Subject: Portability: Fix compile errors on MSVC X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=0b6738b616f36aa5f74808f2a38527302fc987a3;p=simgear.git Portability: Fix compile errors on MSVC From Scott (xDraconian) --- diff --git a/simgear/ephemeris/jupiter.cxx b/simgear/ephemeris/jupiter.cxx index 1d9ca6bd..09f83c84 100644 --- a/simgear/ephemeris/jupiter.cxx +++ b/simgear/ephemeris/jupiter.cxx @@ -22,7 +22,7 @@ * $Id$ **************************************************************************/ -#include +#include #include "jupiter.hxx" diff --git a/simgear/ephemeris/mars.cxx b/simgear/ephemeris/mars.cxx index 78c26f35..d153ef2e 100644 --- a/simgear/ephemeris/mars.cxx +++ b/simgear/ephemeris/mars.cxx @@ -22,7 +22,7 @@ * $Id$ **************************************************************************/ -#include +#include #include "mars.hxx" diff --git a/simgear/ephemeris/mercury.cxx b/simgear/ephemeris/mercury.cxx index da450782..3c342ef3 100644 --- a/simgear/ephemeris/mercury.cxx +++ b/simgear/ephemeris/mercury.cxx @@ -22,7 +22,7 @@ * $Id$ **************************************************************************/ -#include +#include #include "mercury.hxx" diff --git a/simgear/ephemeris/neptune.cxx b/simgear/ephemeris/neptune.cxx index 2fbe7598..12e47ff6 100644 --- a/simgear/ephemeris/neptune.cxx +++ b/simgear/ephemeris/neptune.cxx @@ -25,7 +25,7 @@ #ifdef __BORLANDC__ # define exception c_exception #endif -#include +#include #include "neptune.hxx" diff --git a/simgear/ephemeris/saturn.cxx b/simgear/ephemeris/saturn.cxx index 0038a290..8aed1248 100644 --- a/simgear/ephemeris/saturn.cxx +++ b/simgear/ephemeris/saturn.cxx @@ -22,7 +22,7 @@ * $Id$ **************************************************************************/ -#include +#include #include "saturn.hxx" diff --git a/simgear/ephemeris/star.cxx b/simgear/ephemeris/star.cxx index dee21439..b36a9006 100644 --- a/simgear/ephemeris/star.cxx +++ b/simgear/ephemeris/star.cxx @@ -22,7 +22,7 @@ * $Id$ **************************************************************************/ -#include +#include #include diff --git a/simgear/ephemeris/uranus.cxx b/simgear/ephemeris/uranus.cxx index f3d55601..e4e55dd2 100644 --- a/simgear/ephemeris/uranus.cxx +++ b/simgear/ephemeris/uranus.cxx @@ -22,7 +22,7 @@ * $Id$ **************************************************************************/ -#include +#include #include "uranus.hxx" diff --git a/simgear/ephemeris/venus.cxx b/simgear/ephemeris/venus.cxx index b889107e..54444390 100644 --- a/simgear/ephemeris/venus.cxx +++ b/simgear/ephemeris/venus.cxx @@ -22,7 +22,7 @@ * $Id$ **************************************************************************/ -#include +#include #include "venus.hxx" diff --git a/simgear/io/sg_netChat.cxx b/simgear/io/sg_netChat.cxx index d445e443..3baecdf8 100644 --- a/simgear/io/sg_netChat.cxx +++ b/simgear/io/sg_netChat.cxx @@ -27,6 +27,7 @@ #include #include +#include namespace simgear { diff --git a/simgear/io/sg_socket_udp.cxx b/simgear/io/sg_socket_udp.cxx index bfc8f7bd..6e43eb96 100644 --- a/simgear/io/sg_socket_udp.cxx +++ b/simgear/io/sg_socket_udp.cxx @@ -32,6 +32,7 @@ #include #include // for atoi +#include using std::string; diff --git a/simgear/magvar/coremag.cxx b/simgear/magvar/coremag.cxx index e6d42c1d..8d0616fd 100644 --- a/simgear/magvar/coremag.cxx +++ b/simgear/magvar/coremag.cxx @@ -79,7 +79,7 @@ #include #include -#include +#include #include #include diff --git a/simgear/magvar/magvar.cxx b/simgear/magvar/magvar.cxx index 43563a71..d2225784 100644 --- a/simgear/magvar/magvar.cxx +++ b/simgear/magvar/magvar.cxx @@ -26,7 +26,7 @@ #endif -#include +#include #include #include diff --git a/simgear/magvar/testmagvar.cxx b/simgear/magvar/testmagvar.cxx index 965c0c40..3e63b413 100644 --- a/simgear/magvar/testmagvar.cxx +++ b/simgear/magvar/testmagvar.cxx @@ -1,8 +1,8 @@ /* 2/14/00 fixed help message- dip angle (down positive), variation (E positive) */ -#include -#include -#include +#include +#include +#include #include diff --git a/simgear/misc/strutils.cxx b/simgear/misc/strutils.cxx index c72d0058..86418b4c 100644 --- a/simgear/misc/strutils.cxx +++ b/simgear/misc/strutils.cxx @@ -23,6 +23,7 @@ #include #include #include +#include #include "strutils.hxx" diff --git a/simgear/scene/tgdb/SGBuildingBin.cxx b/simgear/scene/tgdb/SGBuildingBin.cxx index bafb9c38..22055845 100644 --- a/simgear/scene/tgdb/SGBuildingBin.cxx +++ b/simgear/scene/tgdb/SGBuildingBin.cxx @@ -386,10 +386,10 @@ BuildingBoundingBoxCallback::computeBound(const Drawable& drawable) const int row = ((int) (mt_rand(&seed) * 1000)) % 5; float base_y = (float) row * 16.0 * 3.0 / 1024.0; float top_y = base_y + 16.0 * (float) building.floors / 1024.0; - float left_x = 32.0 / 1024.0 * round((float) building.width / 6.0f); + float left_x = 32.0 / 1024.0 * SGMisc::round((float)building.width / 6.0f); float right_x = 0.0f; float front_x = 384.0/1024.0; - float back_x = 384.0/1024.0 + 32.0 / 1024.0 * round((float) building.depth/ 6.0f); + float back_x = 384.0 / 1024.0 + 32.0 / 1024.0 * SGMisc::round((float)building.depth / 6.0f); // BASEMENT - uses the baseline texture for (unsigned int i = 0; i < 16; i++) { @@ -424,7 +424,7 @@ BuildingBoundingBoxCallback::computeBound(const Drawable& drawable) const if (building.pitched) { // Use the entire height of the roof texture top_y = base_y + 16.0 * 3.0 / 1024.0; - left_x = 512/1024.0 + 32.0 / 1024.0 * round(building.width / 6.0f); + left_x = 512 / 1024.0 + 32.0 / 1024.0 * SGMisc::round(building.width / 6.0f); right_x = 512/1024.0; front_x = 480.0/1024.0; back_x = 512.0/1024.0; @@ -475,7 +475,7 @@ BuildingBoundingBoxCallback::computeBound(const Drawable& drawable) const int column = ((int) (mt_rand(&seed) * 1000)) % 5; float base_y = 288 / 1024.0; float top_y = base_y + 16.0 * (float) building.floors / 1024.0; - float left_x = column * 192.0 /1024.0 + 32.0 / 1024.0 * round((float) building.width / 10.0f); + float left_x = column * 192.0 / 1024.0 + 32.0 / 1024.0 * SGMisc::round((float)building.width / 10.0f); float right_x = column * 192.0 /1024.0; // BASEMENT - uses the baseline texture @@ -560,7 +560,7 @@ BuildingBoundingBoxCallback::computeBound(const Drawable& drawable) const int column = ((int) (mt_rand(&seed) * 1000)) % 8; float base_y = 576 / 1024.0; float top_y = base_y + 16.0 * (float) building.floors / 1024.0; - float left_x = column * 128.0 /1024.0 + 32.0 / 1024.0 * round((float) building.width / 20.0f); + float left_x = column * 128.0 / 1024.0 + 32.0 / 1024.0 * SGMisc::round((float)building.width / 20.0f); float right_x = column * 128.0 /1024.0; // BASEMENT - uses the baseline texture