From: <sv...@ww...> - 2004-10-01 06:36:12
|
Author: mkrose Date: 2004-09-30 23:35:57 -0700 (Thu, 30 Sep 2004) New Revision: 1267 Modified: trunk/CSP/SimData/CHANGES.current trunk/CSP/SimData/Source/GeoPos.cpp Log: Fix a few msvc warnings. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1267 Modified: trunk/CSP/SimData/CHANGES.current =================================================================== --- trunk/CSP/SimData/CHANGES.current 2004-10-01 06:26:10 UTC (rev 1266) +++ trunk/CSP/SimData/CHANGES.current 2004-10-01 06:35:57 UTC (rev 1267) @@ -1,6 +1,9 @@ Version 0.4.0 (in progress) =========================== +2004-09-30: onsight + * Added explicit casts to silence msvc warnings in GeoPos.cpp. + 2004-09-29: onsight * Clean up warnings and formatting in Date.h/cpp. Modified: trunk/CSP/SimData/Source/GeoPos.cpp =================================================================== --- trunk/CSP/SimData/Source/GeoPos.cpp 2004-10-01 06:26:10 UTC (rev 1266) +++ trunk/CSP/SimData/Source/GeoPos.cpp 2004-10-01 06:35:57 UTC (rev 1267) @@ -522,7 +522,7 @@ char B; int n = sscanf(c, "%lf %lf %d%c %lf", &X, &Y, &A, &B, &Z); if (n != 5) throw ParseException("SYNTAX ERROR: expecting 'northing easting zone altitude'"); - setUTM(X, Y, A, B, Z); + setUTM(X, Y, static_cast<char>(A), B, Z); } else { int n = sscanf(c, "%lf %lf %lf", &X, &Y, &Z); if (n != 3) throw ParseException("SYNTAX ERROR: expecting 'latitude longitude altitude'"); @@ -880,8 +880,8 @@ if (c2) { _zone *= 10; _zone += c1 - '0'; - _designator = toupper(c2); - } else _designator = toupper(c1); + _designator = static_cast<char>(toupper(c2)); + } else _designator = static_cast<char>(toupper(c1)); } if (!valid()) { // TODO @@ -917,8 +917,8 @@ char designator_; int n = sscanf(c, "%lf %lf %d%c %lf", &_E, &_N, &zone_, &designator_, &_alt); if (n != 5) throw ParseException("SYNTAX ERROR: expecting 'easting northing zone altitude'"); - _zone = zone_; - _designator = toupper(designator_); + _zone = static_cast<char>(zone_); + _designator = static_cast<char>(toupper(designator_)); if (!valid()) { throw ParseException("SYNTAX ERROR: invalid UTM code"); } |