diff --git a/simgear/io/sg_serial.hxx b/simgear/io/sg_serial.hxx index 85a92e1c..e02ace64 100644 --- a/simgear/io/sg_serial.hxx +++ b/simgear/io/sg_serial.hxx @@ -40,15 +40,13 @@ #include "iochannel.hxx" -using std::string; - /** * A serial I/O class based on SGIOChannel. */ class SGSerial : public SGIOChannel { - string device; - string baud; + std::string device; + std::string baud; SGSerialPort port; char save_buf[ 2 * SG_IO_MAX_MSG_SIZE ]; @@ -68,7 +66,7 @@ public: * @param device_name name of serial device * @param baud_rate speed of communication */ - SGSerial( const string& device_name, const string& baud_rate ); + SGSerial( const std::string& device_name, const std::string& baud_rate ); /** Destructor */ ~SGSerial(); diff --git a/simgear/math/interpolater.hxx b/simgear/math/interpolater.hxx index 393e39ff..34dff626 100644 --- a/simgear/math/interpolater.hxx +++ b/simgear/math/interpolater.hxx @@ -38,9 +38,7 @@ #include #include - #include -using std::string; class SGPropertyNode; @@ -69,7 +67,7 @@ public: * Constructor. Loads the interpolation table from the specified file. * @param file name of interpolation file */ - SGInterpTable( const string& file ); + SGInterpTable( const std::string& file ); /** diff --git a/simgear/props/condition.cxx b/simgear/props/condition.cxx index bfc1bf61..04b892e5 100644 --- a/simgear/props/condition.cxx +++ b/simgear/props/condition.cxx @@ -22,6 +22,8 @@ using std::istream; using std::ostream; +using std::string; + /** * Condition for a single property. * diff --git a/simgear/scene/material/Technique.cxx b/simgear/scene/material/Technique.cxx index 3a09dfea..a3c5e34e 100644 --- a/simgear/scene/material/Technique.cxx +++ b/simgear/scene/material/Technique.cxx @@ -271,19 +271,19 @@ class ExtensionSupportedExpression { public: ExtensionSupportedExpression() {} - ExtensionSupportedExpression(const string& extString) + ExtensionSupportedExpression(const std::string& extString) : _extString(extString) { } - const string& getExtensionString() { return _extString; } - void setExtensionString(const string& extString) { _extString = extString; } + const std::string& getExtensionString() { return _extString; } + void setExtensionString(const std::string& extString) { _extString = extString; } void eval(bool&value, const expression::Binding* b) const { int contextId = getOperand(0)->getValue(b); value = isGLExtensionSupported((unsigned)contextId, _extString.c_str()); } protected: - string _extString; + std::string _extString; }; Expression* extensionSupportedParser(const SGPropertyNode* exp, diff --git a/simgear/scene/model/SGLightAnimation.cxx b/simgear/scene/model/SGLightAnimation.cxx index 5806c323..b049c15d 100644 --- a/simgear/scene/model/SGLightAnimation.cxx +++ b/simgear/scene/model/SGLightAnimation.cxx @@ -36,7 +36,7 @@ #include #include -typedef std::map > EffectMap; +typedef std::map > EffectMap; static EffectMap lightEffectMap; #define GET_COLOR_VALUE(n) \ @@ -96,7 +96,7 @@ public: SGLightAnimation::SGLightAnimation(const SGPropertyNode* configNode, SGPropertyNode* modelRoot, const osgDB::Options* options, - const string &path, int i) : + const std::string &path, int i) : SGAnimation(configNode, modelRoot), _options(options) { @@ -113,7 +113,7 @@ SGLightAnimation::SGLightAnimation(const SGPropertyNode* configNode, _cutoff = getConfig()->getDoubleValue("cutoff"); _near = getConfig()->getDoubleValue("near-m"); _far = getConfig()->getDoubleValue("far-m"); - _key = path + ";" + boost::lexical_cast( i ); + _key = path + ";" + boost::lexical_cast( i ); SGConstPropertyNode_ptr dim_factor = configNode->getChild("dim-factor"); if (dim_factor.valid()) { diff --git a/simgear/scene/model/SGMaterialAnimation.hxx b/simgear/scene/model/SGMaterialAnimation.hxx index 1fe5da8d..bb62e83b 100644 --- a/simgear/scene/model/SGMaterialAnimation.hxx +++ b/simgear/scene/model/SGMaterialAnimation.hxx @@ -23,7 +23,7 @@ class SGMaterialAnimation : public SGAnimation { public: SGMaterialAnimation(const SGPropertyNode* configNode, SGPropertyNode* modelRoot, - const osgDB::Options* options,const string &path); + const osgDB::Options* options,const std::string &path); virtual osg::Group* createAnimationGroup(osg::Group& parent); virtual void install(osg::Node& node); static SGPropertyNode_ptr makeEffectProperties(const SGPropertyNode* animProp); diff --git a/simgear/scene/model/animation.cxx b/simgear/scene/model/animation.cxx index fa9931a4..30cab2e3 100644 --- a/simgear/scene/model/animation.cxx +++ b/simgear/scene/model/animation.cxx @@ -344,7 +344,7 @@ SGAnimation::~SGAnimation() if (!_found) { std::list::const_iterator i; - string info; + std::string info; for (i = _objectNames.begin(); i != _objectNames.end(); ++i) { if (!info.empty()) @@ -365,7 +365,7 @@ bool SGAnimation::animate(osg::Node* node, const SGPropertyNode* configNode, SGPropertyNode* modelRoot, const osgDB::Options* options, - const string &path, int i) + const std::string &path, int i) { std::string type = configNode->getStringValue("type", "none"); if (type == "alpha-test") { diff --git a/simgear/scene/model/animation.hxx b/simgear/scene/model/animation.hxx index 8cf0b020..048d991f 100644 --- a/simgear/scene/model/animation.hxx +++ b/simgear/scene/model/animation.hxx @@ -48,7 +48,7 @@ public: static bool animate(osg::Node* node, const SGPropertyNode* configNode, SGPropertyNode* modelRoot, const osgDB::Options* options, - const string &path, int i); + const std::string &path, int i); protected: void apply(osg::Node* node); @@ -354,11 +354,11 @@ public: SGLightAnimation(const SGPropertyNode* configNode, SGPropertyNode* modelRoot, const osgDB::Options* options, - const string &path, int i); + const std::string &path, int i); virtual osg::Group* createAnimationGroup(osg::Group& parent); virtual void install(osg::Node& node); private: - string _light_type; + std::string _light_type; SGVec3d _position; SGVec3d _direction; SGVec4d _ambient; @@ -369,7 +369,7 @@ private: double _cutoff; double _near; double _far; - string _key; + std::string _key; class UpdateCallback; friend class UpdateCallback; SGSharedPtr _animationValue; diff --git a/simgear/structure/SGExpression.hxx b/simgear/structure/SGExpression.hxx index 193dbbca..2cfa3dc8 100644 --- a/simgear/structure/SGExpression.hxx +++ b/simgear/structure/SGExpression.hxx @@ -26,7 +26,8 @@ #include #include #include - +#include + #include #include #include @@ -949,7 +950,7 @@ namespace simgear { struct ParseError : public sg_exception { - ParseError(const string& message = std::string()) + ParseError(const std::string& message = std::string()) : sg_exception(message) {} }; @@ -1014,7 +1015,7 @@ namespace simgear { public: size_t addBinding(const std::string& name, expression::Type type); - bool findBinding(const string& name, VariableBinding& result) const; + bool findBinding(const std::string& name, VariableBinding& result) const; std::vector bindings; }; @@ -1031,7 +1032,7 @@ namespace simgear ParserMap& map = getParserMap(); ParserMap::iterator itr = map.find(exp->getName()); if (itr == map.end()) - throw ParseError(string("unknown expression ") + exp->getName()); + throw ParseError(std::string("unknown expression ") + exp->getName()); exp_parser parser = itr->second; return (*parser)(exp, this); }