summaryrefslogtreecommitdiff
path: root/src/resources/db
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2020-02-23 09:30:51 +0300
committerAndrei Karas <akaras@inbox.ru>2020-02-23 09:30:51 +0300
commit1e2a88e975019929c4c7e3154537865cc09550a6 (patch)
treeae8bc68ad3a3f6b61a5e2d511d7fc17daa22bd0e /src/resources/db
parent6941fd4eeb1dce20aba8c42fd030c2690c37b731 (diff)
downloadmv-1e2a88e975019929c4c7e3154537865cc09550a6.tar.gz
mv-1e2a88e975019929c4c7e3154537865cc09550a6.tar.bz2
mv-1e2a88e975019929c4c7e3154537865cc09550a6.tar.xz
mv-1e2a88e975019929c4c7e3154537865cc09550a6.zip
Fix some code style issues
Diffstat (limited to 'src/resources/db')
-rw-r--r--src/resources/db/itemdb.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/resources/db/itemdb.cpp b/src/resources/db/itemdb.cpp
index e5b13f9bb..e6e3cc323 100644
--- a/src/resources/db/itemdb.cpp
+++ b/src/resources/db/itemdb.cpp
@@ -988,12 +988,11 @@ static void loadSoundRef(ItemInfo *const itemInfo, XmlNodeConstPtr node)
return;
}
const std::string event = XML::getProperty(node, "event", "");
- const int delay = XML::getProperty(node, "delay", 0);
-
const std::map<std::string, ItemSoundEvent::Type>::const_iterator
it = mSoundNames.find(event);
if (it != mSoundNames.end())
{
+ const int delay = XML::getProperty(node, "delay", 0);
const std::string filename = XmlChildContent(node);
itemInfo->addSound((*it).second, filename, delay);
}