diff options
| author | Tobias Markmann <tm@ayena.de> | 2015-10-01 10:01:41 (GMT) |
|---|---|---|
| committer | Swift Review <review@swift.im> | 2015-10-14 16:36:29 (GMT) |
| commit | 192e8631d4c9a196e13a20d22f57c392bac9dd73 (patch) | |
| tree | 408ea2d461eaff1ca3d97ee0e00edb2e1d01754f /Swift/Controllers/Roster/Roster.cpp | |
| parent | b00c84574fc730eeeabb57df1f17b54855218193 (diff) | |
| download | swift-192e8631d4c9a196e13a20d22f57c392bac9dd73.zip swift-192e8631d4c9a196e13a20d22f57c392bac9dd73.tar.bz2 | |
Annotate getter method as const as it does not write anything
Test-Information:
Still builds and unit tests pass.
Change-Id: I472491184ba10ec3bdbd4cb94613768639ac6f57
Diffstat (limited to 'Swift/Controllers/Roster/Roster.cpp')
| -rw-r--r-- | Swift/Controllers/Roster/Roster.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Swift/Controllers/Roster/Roster.cpp b/Swift/Controllers/Roster/Roster.cpp index 49338a4..84561e5 100644 --- a/Swift/Controllers/Roster/Roster.cpp +++ b/Swift/Controllers/Roster/Roster.cpp | |||
| @@ -1,27 +1,26 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2010-2013 Isode Limited. | 2 | * Copyright (c) 2010-2015 Isode Limited. |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * See the COPYING file for more information. | 4 | * See the COPYING file for more information. |
| 5 | */ | 5 | */ |
| 6 | 6 | ||
| 7 | #include <Swift/Controllers/Roster/Roster.h> | 7 | #include <Swift/Controllers/Roster/Roster.h> |
| 8 | 8 | ||
| 9 | #include <string> | ||
| 10 | #include <iostream> | ||
| 11 | #include <set> | ||
| 12 | #include <deque> | 9 | #include <deque> |
| 10 | #include <set> | ||
| 11 | #include <string> | ||
| 13 | 12 | ||
| 14 | #include <boost/bind.hpp> | 13 | #include <boost/bind.hpp> |
| 15 | 14 | ||
| 16 | #include <Swiften/Base/foreach.h> | 15 | #include <Swiften/Base/foreach.h> |
| 17 | #include <Swiften/JID/JID.h> | 16 | #include <Swiften/JID/JID.h> |
| 18 | 17 | ||
| 19 | #include <Swift/Controllers/Roster/ContactRosterItem.h> | 18 | #include <Swift/Controllers/Roster/ContactRosterItem.h> |
| 20 | #include <Swift/Controllers/Roster/RosterItem.h> | ||
| 21 | #include <Swift/Controllers/Roster/GroupRosterItem.h> | 19 | #include <Swift/Controllers/Roster/GroupRosterItem.h> |
| 22 | #include <Swift/Controllers/Roster/ItemOperations/RosterItemOperation.h> | 20 | #include <Swift/Controllers/Roster/ItemOperations/RosterItemOperation.h> |
| 21 | #include <Swift/Controllers/Roster/RosterItem.h> | ||
| 23 | 22 | ||
| 24 | namespace Swift { | 23 | namespace Swift { |
| 25 | 24 | ||
| 26 | Roster::Roster(bool sortByStatus, bool fullJIDMapping) : blockingSupported_(false) { | 25 | Roster::Roster(bool sortByStatus, bool fullJIDMapping) : blockingSupported_(false) { |
| 27 | sortByStatus_ = sortByStatus; | 26 | sortByStatus_ = sortByStatus; |
| @@ -46,11 +45,11 @@ Roster::~Roster() { | |||
| 46 | } | 45 | } |
| 47 | delete item; | 46 | delete item; |
| 48 | } | 47 | } |
| 49 | } | 48 | } |
| 50 | 49 | ||
| 51 | GroupRosterItem* Roster::getRoot() { | 50 | GroupRosterItem* Roster::getRoot() const { |
| 52 | return root_; | 51 | return root_; |
| 53 | } | 52 | } |
| 54 | 53 | ||
| 55 | GroupRosterItem* Roster::getGroup(const std::string& groupName) { | 54 | GroupRosterItem* Roster::getGroup(const std::string& groupName) { |
| 56 | foreach (RosterItem *item, root_->getChildren()) { | 55 | foreach (RosterItem *item, root_->getChildren()) { |
Swift