diff options
Diffstat (limited to 'src/gui/windows/whoisonline.cpp')
-rw-r--r-- | src/gui/windows/whoisonline.cpp | 27 |
1 files changed, 8 insertions, 19 deletions
diff --git a/src/gui/windows/whoisonline.cpp b/src/gui/windows/whoisonline.cpp index 8417e5dc8..2cb1c1e16 100644 --- a/src/gui/windows/whoisonline.cpp +++ b/src/gui/windows/whoisonline.cpp @@ -251,33 +251,22 @@ void WhoIsOnline::updateWindow(size_t numOnline) std::sort(mFriends.begin(), mFriends.end(), nameCompare); std::sort(mNeutral.begin(), mNeutral.end(), nameCompare); std::sort(mDisregard.begin(), mDisregard.end(), nameCompare); - bool addedFromSection(false); FOR_EACH (STD_VECTOR<OnlinePlayer*>::const_iterator, it, mFriends) - { mBrowserBox->addRow((*it)->getText(), false); - addedFromSection = true; - } - if (addedFromSection == true) - { + + if (!mFriends.empty()) mBrowserBox->addRow("---", false); - addedFromSection = false; - } + FOR_EACH (STD_VECTOR<OnlinePlayer*>::const_iterator, it, mEnemy) - { mBrowserBox->addRow((*it)->getText(), false); - addedFromSection = true; - } - if (addedFromSection == true) - { + + if (!mEnemy.empty()) mBrowserBox->addRow("---", false); - addedFromSection = false; - } + FOR_EACH (STD_VECTOR<OnlinePlayer*>::const_iterator, it, mNeutral) - { mBrowserBox->addRow((*it)->getText(), false); - addedFromSection = true; - } - if (addedFromSection == true && !mDisregard.empty()) + + if (!mNeutral.empty() && !mDisregard.empty()) mBrowserBox->addRow("---", false); FOR_EACH (STD_VECTOR<OnlinePlayer*>::const_iterator, it, mDisregard) |