From 94727e1a91ada52ace0950cb3a9c22a53a3f5bb6 Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Sat, 13 Feb 2010 12:35:09 +0100 Subject: Remove imprecise operator== and just compare the text --- src/gui/truetypefont.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src') diff --git a/src/gui/truetypefont.cpp b/src/gui/truetypefont.cpp index fe507489..5ebe16c6 100644 --- a/src/gui/truetypefont.cpp +++ b/src/gui/truetypefont.cpp @@ -43,11 +43,6 @@ class TextChunk delete img; } - bool operator==(const std::string &str) const - { - return (str == text); - } - bool operator==(const TextChunk &chunk) const { return (chunk.text == text && chunk.color == color); @@ -170,7 +165,7 @@ int TrueTypeFont::getWidth(const std::string &text) const { for (CacheIterator i = mCache.begin(); i != mCache.end(); i++) { - if ((*i) == text) + if (i->text == text) { // Raise priority: move it to front // Assumption is that TTF::draw will be called next -- cgit v1.2.3-60-g2f50