diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-03-11 18:09:33 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-03-11 18:09:33 +0300 |
commit | 17dcb835103ac05012c5a7eafa8c7702cef53390 (patch) | |
tree | 422c28adfba13f2161fcfc36943a3903e531490b /src/gui/socialwindow.cpp | |
parent | 84d53b7bb98bb44696ed1bc2c3f132e51394ac00 (diff) | |
download | manaverse-17dcb835103ac05012c5a7eafa8c7702cef53390.tar.gz manaverse-17dcb835103ac05012c5a7eafa8c7702cef53390.tar.bz2 manaverse-17dcb835103ac05012c5a7eafa8c7702cef53390.tar.xz manaverse-17dcb835103ac05012c5a7eafa8c7702cef53390.zip |
Add some fixes after automatic checks.
Diffstat (limited to 'src/gui/socialwindow.cpp')
-rw-r--r-- | src/gui/socialwindow.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/gui/socialwindow.cpp b/src/gui/socialwindow.cpp index 6c74f4397..653140e3f 100644 --- a/src/gui/socialwindow.cpp +++ b/src/gui/socialwindow.cpp @@ -766,16 +766,15 @@ public: if (!map) return; - Avatar *ava = nullptr; std::vector<Avatar*>::const_iterator i = avatars->begin(); const std::vector<Avatar*>::const_iterator i_end = avatars->end(); while (i != i_end) { - ava = (*i); + Avatar *const ava = *i; if (!ava) break; - const MapItem *const item = map->findPortalXY( + const MapItem *const item = map->findPortalXY( ava->getX(), ava->getY()); if (item) { @@ -802,14 +801,12 @@ public: if (!map) return 01; - const Avatar *ava = nullptr; std::vector<Avatar*>::const_iterator i = avatars->begin(); const std::vector<Avatar*>::const_iterator i_end = avatars->end(); unsigned num = 0; while (i != i_end) { - ava = (*i); - + const Avatar *const ava = *i; if (!ava) break; |