Merge lp:~michihenning/unity/ResultIterator-1163705 into lp:unity

Proposed by Michi Henning
Status: Merged
Approved by: Stephen M. Webb
Approved revision: no longer in the source branch.
Merged at revision: 3287
Proposed branch: lp:~michihenning/unity/ResultIterator-1163705
Merge into: lp:unity
Diff against target: 67 lines (+9/-9)
2 files modified
UnityCore/ResultIterator.cpp (+2/-2)
UnityCore/ResultIterator.h (+7/-7)
To merge this branch: bzr merge lp:~michihenning/unity/ResultIterator-1163705
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Unity Team Pending
Review via email: mp+156743@code.launchpad.net

Commit message

Fix for bug #1163705

Removed redundant const qualifier on function return types because that causes warnings with gcc and -Wextra -Wall.

Description of the change

Fix for bug #1163705

Removed redundant const qualifier on function return types because that causes warnings with gcc and -Wextra -Wall.

To post a comment you must log in.
Revision history for this message
Stephen M. Webb (bregma) wrote :

Whittlin' down the -Wextra. Gettin' there.

Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'UnityCore/ResultIterator.cpp'
2--- UnityCore/ResultIterator.cpp 2012-10-29 09:34:54 +0000
3+++ UnityCore/ResultIterator.cpp 2013-04-04 22:48:22 +0000
4@@ -124,13 +124,13 @@
5 return iter_result_;
6 }
7
8-bool const ResultIterator::IsLast()
9+bool ResultIterator::IsLast()
10 {
11 if (!model_) return true;
12 return (dee_model_is_last(model_, iter_));
13 }
14
15-bool const ResultIterator::IsFirst()
16+bool ResultIterator::IsFirst()
17 {
18 if (!model_) return true;
19 return (dee_model_is_first(model_, iter_));
20
21=== modified file 'UnityCore/ResultIterator.h'
22--- UnityCore/ResultIterator.h 2012-09-02 20:34:37 +0000
23+++ UnityCore/ResultIterator.h 2013-04-04 22:48:22 +0000
24@@ -53,27 +53,27 @@
25 ResultIterator operator-(int value) const;
26
27 ResultIterator operator[](int value);
28- friend inline bool const operator<(const ResultIterator& lhs, const ResultIterator& rhs)
29+ friend inline bool operator<(const ResultIterator& lhs, const ResultIterator& rhs)
30 {
31 return (dee_model_get_position(lhs.model_, lhs.iter_) < dee_model_get_position(rhs.model_, rhs.iter_));
32 }
33
34- friend inline bool const operator>(const ResultIterator& lhs, const ResultIterator& rhs)
35+ friend inline bool operator>(const ResultIterator& lhs, const ResultIterator& rhs)
36 {
37 return (dee_model_get_position(lhs.model_, lhs.iter_) > dee_model_get_position(rhs.model_, rhs.iter_));
38 }
39
40- friend inline bool const operator<=(const ResultIterator& lhs, const ResultIterator& rhs)
41+ friend inline bool operator<=(const ResultIterator& lhs, const ResultIterator& rhs)
42 {
43 return (dee_model_get_position(lhs.model_, lhs.iter_) <= dee_model_get_position(rhs.model_, rhs.iter_));
44 }
45
46- friend inline bool const operator>=(const ResultIterator& lhs, const ResultIterator& rhs)
47+ friend inline bool operator>=(const ResultIterator& lhs, const ResultIterator& rhs)
48 {
49 return (dee_model_get_position(lhs.model_, lhs.iter_) >= dee_model_get_position(rhs.model_, rhs.iter_));
50 }
51
52- friend inline bool const operator==(const ResultIterator& lhs, const ResultIterator& rhs)
53+ friend inline bool operator==(const ResultIterator& lhs, const ResultIterator& rhs)
54 {
55 return (lhs.iter_ == rhs.iter_);
56 }
57@@ -85,8 +85,8 @@
58 Result& operator*();
59
60 /* convenience methods */
61- bool const IsLast();
62- bool const IsFirst();
63+ bool IsLast();
64+ bool IsFirst();
65
66 private:
67 glib::Object<DeeModel> model_;