]> git.mxchange.org Git - simgear.git/commitdiff
Make it compile with gcc-3.3.6
authorfrohlich <frohlich>
Sat, 17 Jun 2006 16:04:05 +0000 (16:04 +0000)
committerfrohlich <frohlich>
Sat, 17 Jun 2006 16:04:05 +0000 (16:04 +0000)
simgear/scene/material/mat.cxx
simgear/scene/material/mat.hxx

index 48ba922aa55c09a119bb7304ad266f51788fd044..b8af8091faacf0a8f878a9466bb4909a4ab3918a 100644 (file)
@@ -317,6 +317,15 @@ void SGMaterial::assignTexture( ssgSimpleState *state, string &fname,
    }
 }
 
+SGMaterialGlyph* SGMaterial::get_glyph (const string& name) const
+{
+  map<string, SGSharedPtr<SGMaterialGlyph> >::const_iterator it;
+  it = glyphs.find(name);
+  if (it == glyphs.end())
+    return 0;
+
+  return it->second;
+}
 
 \f
 ////////////////////////////////////////////////////////////////////////
index 62df39ecbb77e433de30d34fd623b5b67b75a5bd..e3e38a13b4d92b6066ad68f3450c4426ca9cc92f 100644 (file)
@@ -207,10 +207,7 @@ public:
   /**
    * Return pointer to glyph class, or 0 if it doesn't exist.
    */
-  SGMaterialGlyph * get_glyph (const string& name) const {
-    map<string, SGSharedPtr<SGMaterialGlyph> >::const_iterator it = glyphs.find(name);
-    return it != glyphs.end() ? it->second : 0;
-  }
+  SGMaterialGlyph * get_glyph (const string& name) const;
 
 protected: