summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2010-02-13 12:35:09 +0100
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2010-02-13 12:39:18 +0100
commit94727e1a91ada52ace0950cb3a9c22a53a3f5bb6 (patch)
treef61670771a3adc4b5ef79e06237639c509c656b6 /src
parent040e336fb70e331983f9537b2d0daa2d8a962fce (diff)
downloadmana-client-94727e1a91ada52ace0950cb3a9c22a53a3f5bb6.tar.gz
mana-client-94727e1a91ada52ace0950cb3a9c22a53a3f5bb6.tar.bz2
mana-client-94727e1a91ada52ace0950cb3a9c22a53a3f5bb6.tar.xz
mana-client-94727e1a91ada52ace0950cb3a9c22a53a3f5bb6.zip
Remove imprecise operator== and just compare the text
Diffstat (limited to 'src')
-rw-r--r--src/gui/truetypefont.cpp7
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