]> git.mxchange.org Git - flightgear.git/commitdiff
Namespace fixes for std::string
authorJames Turner <zakalawe@mac.com>
Thu, 27 Jun 2013 08:37:06 +0000 (09:37 +0100)
committerJames Turner <zakalawe@mac.com>
Thu, 27 Jun 2013 08:53:12 +0000 (09:53 +0100)
17 files changed:
src/Autopilot/pisimplecontroller.cxx
src/Autopilot/predictor.cxx
src/Cockpit/groundradar.cxx
src/Cockpit/panel.cxx
src/Input/FGMouseInput.cxx
src/Instrumentation/airspeed_indicator.cxx
src/Instrumentation/altimeter.hxx
src/Instrumentation/instrument_mgr.cxx
src/Instrumentation/mk_viii.hxx
src/Instrumentation/newnavradio.cxx
src/Instrumentation/tcas.hxx
src/Main/globals.cxx
src/Main/main.cxx
src/Model/acmodel.cxx
src/Model/panelnode.cxx
src/Viewer/renderingpipeline.cxx
src/Viewer/splash.cxx

index c332606988253b617a0af305a4947d4a71d15a14..643471d7547ca84f15334e76888c19ae76e1a767 100644 (file)
@@ -34,7 +34,7 @@ PISimpleController::PISimpleController() :
 {
 }
 
-bool PISimpleController::configure( const string& nodeName, SGPropertyNode_ptr configNode)
+bool PISimpleController::configure( const std::string& nodeName, SGPropertyNode_ptr configNode)
 {
   if( AnalogComponent::configure( nodeName, configNode ) )
     return true;
index d5c854a728662449133d07a5e3ebd39cb703f42e..9e7c8030e8498e278f18244560bf47c5809392a7 100644 (file)
@@ -34,7 +34,7 @@ Predictor::Predictor () :
 {
 }
 
-bool Predictor::configure(const string& nodeName, SGPropertyNode_ptr configNode)
+bool Predictor::configure(const std::string& nodeName, SGPropertyNode_ptr configNode)
 {
   SG_LOG( SG_AUTOPILOT, SG_BULK, "Predictor::configure(" << nodeName << ")" << endl );
 
index 702ba6d5a941be98139df383432029f2baad44a5..a142f4c22336325ca98f7b2aa4d8963b05e2fa31 100644 (file)
@@ -221,7 +221,7 @@ void GroundRadar::updateTexture()
     osg::ref_ptr<osg::Vec3Array> taxi_vertices = new osg::Vec3Array;
     osg::ref_ptr<osg::Vec3Array> pvt_vertices = new osg::Vec3Array;
 
-    const string airport_name = _airport_node->getStringValue();
+    const std::string airport_name = _airport_node->getStringValue();
 
     const FGAirport* airport = fgFindAirportID(airport_name);
     if (airport == 0)
index 3fbc1994b4a63c9b82d829c1ebbffc6bcff83147..db09777ed30f132b4c76367bfd43a5e2c8c51b15 100644 (file)
@@ -98,10 +98,10 @@ get_aspect_adjust (int xsize, int ysize)
 // Implementation of FGTextureManager.
 ////////////////////////////////////////////////////////////////////////
 
-map<string,osg::ref_ptr<osg::Texture2D> > FGTextureManager::_textureMap;
+map<std::string,osg::ref_ptr<osg::Texture2D> > FGTextureManager::_textureMap;
 
 osg::Texture2D*
-FGTextureManager::createTexture (const string &relativePath, bool staticTexture)
+FGTextureManager::createTexture (const std::string &relativePath, bool staticTexture)
 {
   osg::Texture2D* texture = _textureMap[relativePath].get();
   if (texture == 0) {
@@ -118,7 +118,7 @@ FGTextureManager::createTexture (const string &relativePath, bool staticTexture)
 }
 
 
-void FGTextureManager::addTexture(const string &relativePath,
+void FGTextureManager::addTexture(const std::string &relativePath,
                                   osg::Texture2D* texture)
 {
     _textureMap[relativePath] = texture;
@@ -136,7 +136,7 @@ FGCroppedTexture::FGCroppedTexture ()
 }
 
 
-FGCroppedTexture::FGCroppedTexture (const string &path,
+FGCroppedTexture::FGCroppedTexture (const std::string &path,
                                    float minX, float minY,
                                    float maxX, float maxY)
   : _path(path), _texture(0),
@@ -1135,7 +1135,7 @@ FGTextLayer::setPointSize (float size)
 }
 
 void
-FGTextLayer::setFontName(const string &name)
+FGTextLayer::setFontName(const std::string &name)
 {
   _font_name = name + ".txf";
   FGFontCache *fc = globals->get_fontcache();
@@ -1170,7 +1170,7 @@ FGTextLayer::recalc_value () const
 // Implementation of FGTextLayer::Chunk.
 ////////////////////////////////////////////////////////////////////////
 
-FGTextLayer::Chunk::Chunk (const string &text, const string &fmt)
+FGTextLayer::Chunk::Chunk (const std::string &text, const std::string &fmt)
   : _type(FGTextLayer::TEXT), _fmt(fmt)
 {
   _text = text;
@@ -1179,7 +1179,7 @@ FGTextLayer::Chunk::Chunk (const string &text, const string &fmt)
 }
 
 FGTextLayer::Chunk::Chunk (ChunkType type, const SGPropertyNode * node,
-                          const string &fmt, float mult, float offs,
+                           const std::string &fmt, float mult, float offs,
                            bool truncation)
   : _type(type), _fmt(fmt), _mult(mult), _offs(offs), _trunc(truncation)
 {
index 6ac4c0e9827a4966a532307ad5295d6719787a58..0ea62d0118e70007e79004b1fb923a8f389d7408 100644 (file)
@@ -373,7 +373,7 @@ FGMouseInput::~FGMouseInput()
 void FGMouseInput::init()
 {
   SG_LOG(SG_INPUT, SG_DEBUG, "Initializing mouse bindings");
-  string module = "";
+  std::string module = "";
 
   SGPropertyNode * mouse_nodes = fgGetNode("/input/mice");
   if (mouse_nodes == 0) {
index 3c339451c2407e694c8aa90d84d80dce4216e266..2879f73b74bb6269b305517d16d0b452d72e053a 100644 (file)
@@ -45,7 +45,7 @@ AirspeedIndicator::~AirspeedIndicator ()
 void
 AirspeedIndicator::init ()
 {
-    string branch;
+    std::string branch;
     branch = "/instrumentation/" + _name;
 
     SGPropertyNode *node = fgGetNode(branch.c_str(), _num, true );
index 38c6ba63f0c85c3311dbd4b8c957cab400fbbdca..45c3a4e61260e4da7b89d2426fc49b00ab3cb64f 100644 (file)
@@ -50,7 +50,7 @@ private:
     std::string _name;
     int _num;
     SGPropertyNode_ptr _rootNode;
-    string _static_pressure;
+    std::string _static_pressure;
     double _tau;
     double _quantum;
     double _kollsman;
index 80724e3a651c82bfdc5ecc2147ba393bdd80c495..dbf557eb63ae3590fe9ceadc8c67d66c6451de98 100644 (file)
@@ -110,7 +110,7 @@ bool FGInstrumentMgr::build (SGPropertyNode* config_props)
 {
     for ( int i = 0; i < config_props->nChildren(); ++i ) {
         SGPropertyNode *node = config_props->getChild(i);
-        string name = node->getName();
+        std::string name = node->getName();
 
         std::ostringstream subsystemname;
         subsystemname << "instrument-" << i << '-'
@@ -118,7 +118,7 @@ bool FGInstrumentMgr::build (SGPropertyNode* config_props)
         int index = node->getIntValue("number", 0);
         if (index > 0)
             subsystemname << '['<< index << ']';
-        string id = subsystemname.str();
+        std::string id = subsystemname.str();
       
         if ( name == "adf" ) {
             set_subsystem( id, new ADF( node ), 0.15 );
index 62649eff7aaf263154410ae44003d228d7cee1f4..6529fba7b62b3307e4d9d22dfed3f0e3d8a3d044 100644 (file)
@@ -1329,7 +1329,7 @@ private:
   // MK_VIII (continued) //////////////////////////////////////////////////////
   /////////////////////////////////////////////////////////////////////////////
 
-  string       name;
+  std::string  name;
   int          num;
 
   PowerHandler         power_handler;
index bc54961d94e5565498991d9e50b950fabb40492e..7d4b60f298ba75115ceaf9c09ee15a72024aaaf1 100644 (file)
@@ -174,7 +174,7 @@ protected:
   PropertyObject<double> _trackDistance_m;
   PropertyObject<double> _slantDistance_m;
   PropertyObject<double> _heightAboveStation_ft;
-  PropertyObject<string> _ident;
+  PropertyObject<std::string> _ident;
   PropertyObject<bool>   _inRange;
   PropertyObject<double> _range_nm;
 };
@@ -378,7 +378,9 @@ double VOR::ServiceVolume::adjustRange( double height_ft, double nominalRange_nm
 }
 
 VOR::VOR( SGPropertyNode_ptr rootNode) :
-  NavRadioComponentWithIdent("vor", rootNode, new VORAudioIdent(getIdentString(string("vor"), rootNode->getIndex()))),
+    NavRadioComponentWithIdent("vor", rootNode,
+                               new VORAudioIdent(getIdentString(std::string("vor"),
+                                                                rootNode->getIndex()))),
   _totalTime(0.0),
   _radial( rootNode->getNode(_name,true)->getNode("radial",true) ),
   _radialInbound( rootNode->getNode(_name,true)->getNode("radial-inbound",true) )
@@ -523,7 +525,8 @@ double LOC::ServiceVolume::adjustRange( double azimuthAngle_deg, double elevatio
 }
 
 LOC::LOC( SGPropertyNode_ptr rootNode) :
-  NavRadioComponentWithIdent("loc", rootNode, new LOCAudioIdent(getIdentString(string("loc"), rootNode->getIndex()))),
+    NavRadioComponentWithIdent("loc", rootNode, new LOCAudioIdent(getIdentString(std::string("loc"),
+                                                                                 rootNode->getIndex()))),
   _serviceVolume(),
   _localizerOffset_norm( rootNode->getNode(_name,true)->getNode("offset-norm",true) ),
   _localizerWidth_deg( rootNode->getNode(_name,true)->getNode("width-deg",true) )
@@ -882,7 +885,7 @@ NavRadioImpl::NavRadioImpl( SGPropertyNode_ptr node ) :
   _legacy( this ),
   _name(node->getStringValue("name", "nav")),
   _num(node->getIntValue("number", 0)),
-  _rootNode(fgGetNode( string("/instrumentation/") + _name, _num, true)),
+  _rootNode(fgGetNode( std::string("/instrumentation/") + _name, _num, true)),
   _useFrequencyFormatter( _rootNode->getNode("frequencies/selected-mhz",true), _rootNode->getNode("frequencies/selected-mhz-fmt",true), 0.05 ),
   _stbyFrequencyFormatter( _rootNode->getNode("frequencies/standby-mhz",true), _rootNode->getNode("frequencies/standby-mhz-fmt",true), 0.05 ),
   _navIndicator(_rootNode),
@@ -968,7 +971,7 @@ void NavRadioImpl::Legacy::update( double dt )
         _navRadioImpl->_components[VOR_COMPONENT]->valid() || _navRadioImpl->_components[LOC_COMPONENT]->valid()  
         );
 
-    string ident = _navRadioImpl->_components[VOR_COMPONENT]->getIdent();
+    std::string ident = _navRadioImpl->_components[VOR_COMPONENT]->getIdent();
     if( ident.empty() )
         ident = _navRadioImpl->_components[LOC_COMPONENT]->getIdent();
 
index 9f9f0964e0cd087288a19e7ef69b6fda10d9d8b5..89d929114257bd42b5ffa32bc659370814499b34 100644 (file)
@@ -114,7 +114,7 @@ class TCAS : public SGSubsystem
 
     typedef struct
     {
-        string callsign;
+        std::string callsign;
         bool   verticalTA;
         bool   verticalRA;
         bool   horizontalTA;
@@ -134,7 +134,7 @@ class TCAS : public SGSubsystem
         double RAtimestamp;
     } TrackerTarget;
 
-    typedef map<string,TrackerTarget*> TrackerTargets;
+    typedef map<std::string,TrackerTarget*> TrackerTargets;
 
     typedef struct
     {
@@ -264,12 +264,12 @@ class TCAS : public SGSubsystem
 
         void update          (void);
 
-        void add             (const string callsign, int detectedLevel);
+        void add             (const std::string callsign, int detectedLevel);
         bool active          (void) { return haveTargets;}
         bool newTraffic      (void) { return newTargets;}
-        bool isTracked       (string callsign) { if (!haveTargets) return false;else return _isTracked(callsign);}
-        bool _isTracked      (string callsign);
-        int  getThreatLevel  (string callsign);
+        bool isTracked       (std::string callsign) { if (!haveTargets) return false;else return _isTracked(callsign);}
+        bool _isTracked      (std::string callsign);
+        int  getThreatLevel  (std::string callsign);
 
     private:
         TCAS*  tcas;
@@ -358,7 +358,7 @@ class TCAS : public SGSubsystem
     };
 
 private:
-    string              name;
+    std::string              name;
     int                 num;
     double              nextUpdateTime;
     int                 selfTestStep;
index 8e5547d1055de262f70d37a0c3dc10956f1e7705..45d70af524b6c0f0dd1ee87698a7877011418632 100644 (file)
@@ -220,7 +220,7 @@ FGGlobals::~FGGlobals()
 }
 
 // set the fg_root path
-void FGGlobals::set_fg_root (const string &root) {
+void FGGlobals::set_fg_root (const std::string &root) {
     SGPath tmp(root);
     fg_root = tmp.realpath();
 
@@ -247,12 +247,12 @@ void FGGlobals::set_fg_root (const string &root) {
 }
 
 // set the fg_home path
-void FGGlobals::set_fg_home (const string &home) {
+void FGGlobals::set_fg_home (const std::string &home) {
     SGPath tmp(home);
     fg_home = tmp.realpath();
 }
 
-void FGGlobals::append_fg_scenery (const string &paths)
+void FGGlobals::append_fg_scenery (const std::string &paths)
 {
 //    fg_scenery.clear();
     SGPropertyNode* sim = fgGetNode("/sim", true);
index ebb72641a95eb6d2dd220dd2dd4c6fc9b6a8ddde..ea94dd4cd23db361edc95f350e75362a5810f540 100644 (file)
@@ -301,7 +301,7 @@ int fgMainInit( int argc, char **argv ) {
     // now home is initialised, we can log to a file inside it
     logToFile();
     
-    string version;
+    std::string version;
 #ifdef FLIGHTGEAR_VERSION
     version = FLIGHTGEAR_VERSION;
 #else
index c25802f4ff115611a3a5b8bdbed0541135ae8d86..73701f6220299aa039448598c9f463c80ba8cfa7 100644 (file)
@@ -65,7 +65,7 @@ FGAircraftModel::init ()
   osg::Node *model = NULL;
 
   _aircraft = new SGModelPlacement;
-  string path = fgGetString("/sim/model/path", "Models/Geometry/glider.ac");
+  std::string path = fgGetString("/sim/model/path", "Models/Geometry/glider.ac");
 
   SGPath resolvedPath = globals->resolve_aircraft_path(path);
   if (resolvedPath.isNull())
index 4d9a2faf1ebbccb9545d10de547787845f5598e6..9e6c81cde878221e3f3adf746bcf766f24629ea1 100644 (file)
@@ -179,7 +179,7 @@ void FGPanelNode::lazyLoad()
     _panel = fgReadPanel(_panelPath);
     if (!_panel) {
       SG_LOG(SG_COCKPIT, SG_WARN, "failed to read panel from:" << _panelPath);
-      _panelPath = string(); // don't keep trying to read
+      _panelPath = std::string(); // don't keep trying to read
       return;
     }
     
index ab4f9640ac377cf9291e75aa194c3134023eb275..1c0cb345d53207eedc16a3a0440680073165ac46 100644 (file)
@@ -132,8 +132,8 @@ void findAttrOrHex(const simgear::effect::EffectPropertyMap<T>& pMap,
         try {
             result = boost::lexical_cast<T>(val);
         } catch (boost::bad_lexical_cast &) {
-            throw simgear::effect::BuilderException(string("findAttrOrHex: could not find attribute ")
-                                   string(val));
+            throw simgear::effect::BuilderException(std::string("findAttrOrHex: could not find attribute ")
+                                                    + std::string(val));
         }
     }
 }
index 5615efc160570ada20ad8a5319934184e046a2ac..fb79955189b6f0ed43f5defbcb9a7416a425ce1b 100644 (file)
@@ -388,7 +388,7 @@ void fgSplashInit () {
 void fgSplashProgress( const char *identifier ) {
   const char* spinChars = "-\\|/";
   static int spin_count = 0;
-  string spin_status = string("");
+  std::string spin_status = std::string("");
 
   if (identifier[0] != 0)
       spin_status += spinChars[spin_count++ % 4];
@@ -398,7 +398,7 @@ void fgSplashProgress( const char *identifier ) {
   const char* text = "";
   if (identifier[0] != 0)
   {
-      string id = string("splash/") + identifier;
+      std::string id = std::string("splash/") + identifier;
       text = globals->get_locale()->getLocalizedString(id.c_str(),
                                                        "sys", "<incomplete language resource>");
   }