summaryrefslogtreecommitdiff
path: root/src/game-server/monstermanager.cpp
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2011-03-17 00:42:38 +0100
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2011-03-17 00:57:16 +0100
commit9344a79233882ac278b3812b91b6edf874ef5d16 (patch)
treee5bd324104a9d8dcf1839de8a880845f8739a37a /src/game-server/monstermanager.cpp
parent0e24b15a386d45f43cea76c1b8ad744728a3190e (diff)
downloadmanaserv-9344a79233882ac278b3812b91b6edf874ef5d16.tar.gz
manaserv-9344a79233882ac278b3812b91b6edf874ef5d16.tar.bz2
manaserv-9344a79233882ac278b3812b91b6edf874ef5d16.tar.xz
manaserv-9344a79233882ac278b3812b91b6edf874ef5d16.zip
Micro-optimizations related to std::string
* Rely on the fact that a std::string is empty by default * Use std::string::empty() rather than comparing to "" * Construct with std::string() rather than from "" Reviewed-by: Bertram
Diffstat (limited to 'src/game-server/monstermanager.cpp')
-rw-r--r--src/game-server/monstermanager.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/game-server/monstermanager.cpp b/src/game-server/monstermanager.cpp
index 0810164f..a719e1a8 100644
--- a/src/game-server/monstermanager.cpp
+++ b/src/game-server/monstermanager.cpp
@@ -239,7 +239,8 @@ void MonsterManager::reload()
att->aftDelay = XML::getProperty(subnode, "aft-delay", 0);
att->range = XML::getProperty(subnode, "range", 0);
att->scriptFunction = XML::getProperty(subnode,
- "script-function", "");
+ "script-function",
+ std::string());
std::string sElement = XML::getProperty(subnode,
"element", "neutral");
att->element = elementFromString(sElement);