]> git.mxchange.org Git - simgear.git/blobdiff - simgear/scene/material/EffectBuilder.hxx
Work around apparent OSG 3.2.0 normal binding bug.
[simgear.git] / simgear / scene / material / EffectBuilder.hxx
index 949b5f4e12fd8c9cb29e7f84b8fc3e5ef678254a..06b8ba9f4ab32b054bb9f45583fb16a3c1333e37 100644 (file)
@@ -167,7 +167,7 @@ EffectPropertyMap<T>::EffectPropertyMap(const EffectNameValue<T> (&attrs)[N])
 template<typename T>
 struct SimplePropertyMap
 {
-    typedef std::map<string, T> map_type;
+    typedef std::map<std::string, T> map_type;
     map_type _map;
     template<int N>
     SimplePropertyMap(const EffectNameValue<T> (&attrs)[N])
@@ -197,8 +197,8 @@ void findAttr(const effect::EffectPropertyMap<T>& pMap,
     typename EffectPropertyMap<T>::BMap::iterator itr
         = pMap._map.template get<from>().find(name);
     if (itr == pMap._map.end()) {
-        throw effect::BuilderException(string("findAttr: could not find attribute ")
-                               string(name));
+        throw effect::BuilderException(std::string("findAttr: could not find attribute ")
+                                       + std::string(name));
     } else {
         result = itr->second;
     }
@@ -316,7 +316,7 @@ getVectorProperties(const SGPropertyNode* prop,
     PropertyList useProps = prop->getChildren("use");
     if (useProps.size() == 1) {
         string parentName = useProps[0]->getStringValue();
-        if (parentName.size() == 0 || parentName[0] != '/')
+        if (parentName.empty() || parentName[0] != '/')
             parentName = options->getPropertyNode()->getPath() + "/" + parentName;
         if (parentName[parentName.size() - 1] != '/')
             parentName.append("/");
@@ -331,7 +331,7 @@ getVectorProperties(const SGPropertyNode* prop,
              itr != end;
              ++itr) {
             string childName = (*itr)->getStringValue();
-            if (childName.size() == 0 || childName[0] != '/')
+            if (childName.empty() || childName[0] != '/')
                 result.push_back(parentName + childName);
             else
                 result.push_back(childName);
@@ -373,7 +373,7 @@ public:
 template<typename T>
 struct InstallAttributeBuilder
 {
-    InstallAttributeBuilder(const string& name)
+    InstallAttributeBuilder(const std::string& name)
     {
         PassAttributeBuilder::PassAttrMapSingleton::instance()
             ->passAttrMap.insert(make_pair(name, new T));