diff options
author | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2010-02-13 12:35:09 +0100 |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2010-02-13 12:39:18 +0100 |
commit | 94727e1a91ada52ace0950cb3a9c22a53a3f5bb6 (patch) | |
tree | f61670771a3adc4b5ef79e06237639c509c656b6 | |
parent | 040e336fb70e331983f9537b2d0daa2d8a962fce (diff) | |
download | mana-94727e1a91ada52ace0950cb3a9c22a53a3f5bb6.tar.gz mana-94727e1a91ada52ace0950cb3a9c22a53a3f5bb6.tar.bz2 mana-94727e1a91ada52ace0950cb3a9c22a53a3f5bb6.tar.xz mana-94727e1a91ada52ace0950cb3a9c22a53a3f5bb6.zip |
Remove imprecise operator== and just compare the text
-rw-r--r-- | src/gui/truetypefont.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
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 |