X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FMain%2Ffg_props.cxx;h=975a8a48cfe5dc4fa7923bdd1e2d795d45b955bc;hb=0c00cd3c6d34e4e167457897a274864cb7236da6;hp=f348bc3bd02b1e02e250b6fbb7d913d22b67deaa;hpb=c889198d09c1e12ca3a970c854850c294b3403c4;p=flightgear.git diff --git a/src/Main/fg_props.cxx b/src/Main/fg_props.cxx index f348bc3bd..975a8a48c 100644 --- a/src/Main/fg_props.cxx +++ b/src/Main/fg_props.cxx @@ -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::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::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("/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("/sim/time/gmt-string", getGMTString); // Position - _tiedProperties.Tie("/position/latitude-string", getLatitudeString); - _tiedProperties.Tie("/position/longitude-string", getLongitudeString); + _tiedProperties.Tie("/position/latitude-string", getLatitudeString); + _tiedProperties.Tie("/position/longitude-string", getLongitudeString); // Orientation - _tiedProperties.Tie("/orientation/heading-magnetic-deg", getHeadingMag); - _tiedProperties.Tie("/orientation/track-magnetic-deg", getTrackMag); + _tiedProperties.Tie("/orientation/heading-magnetic-deg", getHeadingMag); + _tiedProperties.Tie("/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 {