diff options
Diffstat (limited to 'src/gui/palette.cpp')
-rw-r--r-- | src/gui/palette.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/gui/palette.cpp b/src/gui/palette.cpp index f3046264f..348f97de8 100644 --- a/src/gui/palette.cpp +++ b/src/gui/palette.cpp @@ -65,15 +65,13 @@ Palette::~Palette() const gcn::Color& Palette::getColor(char c, bool &valid) { - for (Colors::const_iterator col = mColors.begin(), - colEnd = mColors.end(); col != colEnd; ++col) + CharColors::const_iterator it = mCharColors.find(c); + if (it != mCharColors.end()) { - if (col->ch == c) - { - valid = true; - return col->color; - } + valid = true; + return mColors[(*it).second].color; } + valid = false; return BLACK; } |