diff options
author | Remko Tronçon <git@el-tramo.be> | 2012-12-30 16:47:37 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2012-12-30 18:03:54 (GMT) |
commit | 96b31c598f5c229c3acc0579ddfe22dd503e2b9d (patch) | |
tree | d73db22e591e49f088f359b9876df232eb99c6a9 /Swift/Controllers/Roster | |
parent | b19210aa48e7cea40929593daed997668fe789be (diff) | |
download | swift-96b31c598f5c229c3acc0579ddfe22dd503e2b9d.zip swift-96b31c598f5c229c3acc0579ddfe22dd503e2b9d.tar.bz2 |
Enable & fix pedantic CLang warnings.
Change-Id: I70109624b4bd7aab9ba679a3eaabc225dd64a03a
Diffstat (limited to 'Swift/Controllers/Roster')
-rw-r--r-- | Swift/Controllers/Roster/ContactRosterItem.cpp | 12 | ||||
-rw-r--r-- | Swift/Controllers/Roster/Roster.cpp | 4 | ||||
-rw-r--r-- | Swift/Controllers/Roster/UnitTest/TableRosterTest.cpp | 2 |
3 files changed, 10 insertions, 8 deletions
diff --git a/Swift/Controllers/Roster/ContactRosterItem.cpp b/Swift/Controllers/Roster/ContactRosterItem.cpp index 8c388bf..5b1b6e0 100644 --- a/Swift/Controllers/Roster/ContactRosterItem.cpp +++ b/Swift/Controllers/Roster/ContactRosterItem.cpp @@ -24,12 +24,12 @@ StatusShow::Type ContactRosterItem::getStatusShow() const { StatusShow::Type ContactRosterItem::getSimplifiedStatusShow() const { switch (shownPresence_ ? shownPresence_->getShow() : StatusShow::None) { - case StatusShow::Online: return StatusShow::Online; break; - case StatusShow::Away: return StatusShow::Away; break; - case StatusShow::XA: return StatusShow::Away; break; - case StatusShow::FFC: return StatusShow::Online; break; - case StatusShow::DND: return StatusShow::DND; break; - case StatusShow::None: return StatusShow::None; break; + case StatusShow::Online: return StatusShow::Online; + case StatusShow::Away: return StatusShow::Away; + case StatusShow::XA: return StatusShow::Away; + case StatusShow::FFC: return StatusShow::Online; + case StatusShow::DND: return StatusShow::DND; + case StatusShow::None: return StatusShow::None; } assert(false); return StatusShow::None; diff --git a/Swift/Controllers/Roster/Roster.cpp b/Swift/Controllers/Roster/Roster.cpp index 65cf4d2..b5c5998 100644 --- a/Swift/Controllers/Roster/Roster.cpp +++ b/Swift/Controllers/Roster/Roster.cpp @@ -198,13 +198,13 @@ void Roster::removeFilter(RosterFilter *filter) { } void Roster::filterContact(ContactRosterItem* contact, GroupRosterItem* group) { - int oldDisplayedSize = group->getDisplayedChildren().size(); + size_t oldDisplayedSize = group->getDisplayedChildren().size(); bool hide = true; foreach (RosterFilter *filter, filters_) { hide &= (*filter)(contact); } group->setDisplayed(contact, filters_.empty() || !hide); - int newDisplayedSize = group->getDisplayedChildren().size(); + size_t newDisplayedSize = group->getDisplayedChildren().size(); if (oldDisplayedSize == 0 && newDisplayedSize > 0) { onGroupAdded(group); } diff --git a/Swift/Controllers/Roster/UnitTest/TableRosterTest.cpp b/Swift/Controllers/Roster/UnitTest/TableRosterTest.cpp index e433b50..db8a2fd 100644 --- a/Swift/Controllers/Roster/UnitTest/TableRosterTest.cpp +++ b/Swift/Controllers/Roster/UnitTest/TableRosterTest.cpp @@ -6,6 +6,8 @@ #include <Swift/Controllers/Roster/TableRoster.h> +std::ostream& operator<<(std::ostream& os, const Swift::TableRoster::Index& i); + std::ostream& operator<<(std::ostream& os, const Swift::TableRoster::Index& i) { os << "(" << i.section << ", " << i.row << ")"; return os; |