From b3f70d8d46199524edc590269a73c262899763c7 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 8 Sep 2011 00:07:56 +0300 Subject: Replace most iterator to const_iterator. Some other minor changes. --- src/playerinfo.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/playerinfo.cpp') diff --git a/src/playerinfo.cpp b/src/playerinfo.cpp index 769d24a16..562795563 100644 --- a/src/playerinfo.cpp +++ b/src/playerinfo.cpp @@ -68,7 +68,10 @@ void triggerAttr(int id, int old) void triggerStat(int id, const std::string &changed, int old1, int old2) { - StatMap::iterator it = mData.mStats.find(id); + StatMap::const_iterator it = mData.mStats.find(id); + if (it == mData.mStats.end()) + return; + Mana::Event event(Mana::EVENT_UPDATESTAT); event.setInt("id", id); event.setInt("base", it->second.base); -- cgit v1.2.3-70-g09d2