]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/fg_props.cxx
Update for changed SGPath::realpath signature
[flightgear.git] / src / Main / fg_props.cxx
index f348bc3bd02b1e02e250b6fbb7d913d22b67deaa..975a8a48cfe5dc4fa7923bdd1e2d795d45b955bc 100644 (file)
@@ -488,9 +488,9 @@ formatLatLongString (double deg, int format, char *buf, char c) {
         deg += 1.0;
     }
     if (c == 'N' || c == 'S') {
-        snprintf(buf, 32, "%02d* %02d'.%03d%c", int(deg), int(min), int(round((min-int(min))*1000)), c);
+        snprintf(buf, 32, "%02d* %02d'.%03d%c", int(deg), int(min), int(SGMisc<double>::round((min-int(min))*1000)), c);
     } else {
-        snprintf(buf, 32, "%03d* %02d'.%03d%c", int(deg), int(min), int(round((min-int(min))*1000)), c);
+        snprintf(buf, 32, "%03d* %02d'.%03d%c", int(deg), int(min), int(SGMisc<double>::round((min-int(min))*1000)), c);
     }
 
   } else {
@@ -575,18 +575,18 @@ FGProperties::bind ()
   _tiedProperties.Tie("/sim/logging/classes", getLoggingClasses, setLoggingClasses);
   _tiedProperties.Tie("/sim/freeze/master", getFreeze, setFreeze);
 
-  _tiedProperties.Tie("/sim/time/elapsed-sec", getElapsedTime_sec);
+  _tiedProperties.Tie<double>("/sim/time/elapsed-sec", getElapsedTime_sec);
   _tiedProperties.Tie("/sim/time/gmt", getDateString, setDateString);
   fgSetArchivable("/sim/time/gmt");
-  _tiedProperties.Tie("/sim/time/gmt-string", getGMTString);
+  _tiedProperties.Tie<const char*>("/sim/time/gmt-string", getGMTString);
 
   // Position
-  _tiedProperties.Tie("/position/latitude-string", getLatitudeString);
-  _tiedProperties.Tie("/position/longitude-string", getLongitudeString);
+  _tiedProperties.Tie<const char*>("/position/latitude-string", getLatitudeString);
+  _tiedProperties.Tie<const char*>("/position/longitude-string", getLongitudeString);
 
   // Orientation
-  _tiedProperties.Tie("/orientation/heading-magnetic-deg", getHeadingMag);
-  _tiedProperties.Tie("/orientation/track-magnetic-deg", getTrackMag);
+  _tiedProperties.Tie<double>("/orientation/heading-magnetic-deg", getHeadingMag);
+  _tiedProperties.Tie<double>("/orientation/track-magnetic-deg", getTrackMag);
 }
 
 void
@@ -684,15 +684,15 @@ fgLoadFlight (std::istream &input)
 
 
 bool
-fgLoadProps (const char * path, SGPropertyNode * props, bool in_fg_root, int default_mode)
+fgLoadProps (const std::string& path, SGPropertyNode * props, bool in_fg_root, int default_mode)
 {
-    string fullpath;
+    SGPath fullpath;
     if (in_fg_root) {
         SGPath loadpath(globals->get_fg_root());
         loadpath.append(path);
-        fullpath = loadpath.str();
+        fullpath = loadpath;
     } else {
-        fullpath = path;
+        fullpath = SGPath::fromUtf8(path);
     }
 
     try {