summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2012-04-02 20:35:41 +0200
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2012-04-02 20:35:41 +0200
commit31010d6d3ba6600860a9f6dd925ac3d8e3f2c830 (patch)
tree88e0c06f16f00e635860f1ecc7d65d8e0cf4d1de /src/resources
parentbbb4c1c61863b9032af2291bff20814733995391 (diff)
parent9015268746ed9052a9dc83839b2834b5feeab166 (diff)
downloadmana-31010d6d3ba6600860a9f6dd925ac3d8e3f2c830.tar.gz
mana-31010d6d3ba6600860a9f6dd925ac3d8e3f2c830.tar.bz2
mana-31010d6d3ba6600860a9f6dd925ac3d8e3f2c830.tar.xz
mana-31010d6d3ba6600860a9f6dd925ac3d8e3f2c830.zip
Merge branch '0.6'
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/emotedb.cpp6
-rw-r--r--src/resources/emotedb.h4
2 files changed, 5 insertions, 5 deletions
diff --git a/src/resources/emotedb.cpp b/src/resources/emotedb.cpp
index 6a001078..00721ac4 100644
--- a/src/resources/emotedb.cpp
+++ b/src/resources/emotedb.cpp
@@ -45,7 +45,7 @@ void EmoteDB::load()
unload();
mUnknown.name = "unknown";
- mUnknown.effect = 0;
+ mUnknown.effect = -1;
mUnknown.sprite = new ImageSprite(
ResourceManager::getInstance()->getImage("graphics/sprites/error.png"));
@@ -91,7 +91,7 @@ void EmoteDB::load()
const int width = XML::getProperty(emoteNode, "width", 0);
const int height = XML::getProperty(emoteNode, "height", 0);
- if (imageName.empty() || !(width > 0) || !(height > 0))
+ if (imageName.empty() || width <= 0 || height <= 0)
{
logger->log("Emote Database: Warning: Emote with bad imageset values");
delete currentEmote;
@@ -150,7 +150,7 @@ const Emote *EmoteDB::get(int id)
}
}
-const int &EmoteDB::getLast()
+int EmoteDB::getLast()
{
return mLastEmote;
}
diff --git a/src/resources/emotedb.h b/src/resources/emotedb.h
index 1324fb7e..a1e991ec 100644
--- a/src/resources/emotedb.h
+++ b/src/resources/emotedb.h
@@ -48,9 +48,9 @@ namespace EmoteDB
const Emote *get(int id);
- const int &getLast();
+ int getLast();
typedef Emotes::iterator EmotesIterator;
}
-#endif
+#endif // EMOTE_DB_H