From f79906bf16592b1ff081ac9e26f0ab6cfb43b11c Mon Sep 17 00:00:00 2001 From: frohlich Date: Sat, 17 Jun 2006 16:04:05 +0000 Subject: [PATCH] Make it compile with gcc-3.3.6 --- simgear/scene/material/mat.cxx | 9 +++++++++ simgear/scene/material/mat.hxx | 5 +---- 2 files changed, 10 insertions(+), 4 deletions(-) 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: -- 2.39.5