From: frohlich Date: Sat, 17 Jun 2006 16:04:05 +0000 (+0000) Subject: Make it compile with gcc-3.3.6 X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f79906bf16592b1ff081ac9e26f0ab6cfb43b11c;p=simgear.git Make it compile with gcc-3.3.6 --- diff --git a/simgear/scene/material/mat.cxx b/simgear/scene/material/mat.cxx index 48ba922a..b8af8091 100644 --- a/simgear/scene/material/mat.cxx +++ b/simgear/scene/material/mat.cxx @@ -317,6 +317,15 @@ void SGMaterial::assignTexture( ssgSimpleState *state, string &fname, } } +SGMaterialGlyph* SGMaterial::get_glyph (const string& name) const +{ + map >::const_iterator it; + it = glyphs.find(name); + if (it == glyphs.end()) + return 0; + + return it->second; +} //////////////////////////////////////////////////////////////////////// diff --git a/simgear/scene/material/mat.hxx b/simgear/scene/material/mat.hxx index 62df39ec..e3e38a13 100644 --- a/simgear/scene/material/mat.hxx +++ b/simgear/scene/material/mat.hxx @@ -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 >::const_iterator it = glyphs.find(name); - return it != glyphs.end() ? it->second : 0; - } + SGMaterialGlyph * get_glyph (const string& name) const; protected: