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
=== modified file 'UnityCore/ResultIterator.cpp'
--- UnityCore/ResultIterator.cpp 2012-10-29 09:34:54 +0000
+++ UnityCore/ResultIterator.cpp 2013-04-04 22:48:22 +0000
@@ -124,13 +124,13 @@
124 return iter_result_;124 return iter_result_;
125}125}
126126
127bool const ResultIterator::IsLast()127bool ResultIterator::IsLast()
128{128{
129 if (!model_) return true;129 if (!model_) return true;
130 return (dee_model_is_last(model_, iter_));130 return (dee_model_is_last(model_, iter_));
131}131}
132132
133bool const ResultIterator::IsFirst()133bool ResultIterator::IsFirst()
134{134{
135 if (!model_) return true;135 if (!model_) return true;
136 return (dee_model_is_first(model_, iter_));136 return (dee_model_is_first(model_, iter_));
137137
=== modified file 'UnityCore/ResultIterator.h'
--- UnityCore/ResultIterator.h 2012-09-02 20:34:37 +0000
+++ UnityCore/ResultIterator.h 2013-04-04 22:48:22 +0000
@@ -53,27 +53,27 @@
53 ResultIterator operator-(int value) const;53 ResultIterator operator-(int value) const;
5454
55 ResultIterator operator[](int value);55 ResultIterator operator[](int value);
56 friend inline bool const operator<(const ResultIterator& lhs, const ResultIterator& rhs)56 friend inline bool operator<(const ResultIterator& lhs, const ResultIterator& rhs)
57 {57 {
58 return (dee_model_get_position(lhs.model_, lhs.iter_) < dee_model_get_position(rhs.model_, rhs.iter_));58 return (dee_model_get_position(lhs.model_, lhs.iter_) < dee_model_get_position(rhs.model_, rhs.iter_));
59 }59 }
6060
61 friend inline bool const operator>(const ResultIterator& lhs, const ResultIterator& rhs)61 friend inline bool operator>(const ResultIterator& lhs, const ResultIterator& rhs)
62 {62 {
63 return (dee_model_get_position(lhs.model_, lhs.iter_) > dee_model_get_position(rhs.model_, rhs.iter_));63 return (dee_model_get_position(lhs.model_, lhs.iter_) > dee_model_get_position(rhs.model_, rhs.iter_));
64 }64 }
6565
66 friend inline bool const operator<=(const ResultIterator& lhs, const ResultIterator& rhs)66 friend inline bool operator<=(const ResultIterator& lhs, const ResultIterator& rhs)
67 {67 {
68 return (dee_model_get_position(lhs.model_, lhs.iter_) <= dee_model_get_position(rhs.model_, rhs.iter_));68 return (dee_model_get_position(lhs.model_, lhs.iter_) <= dee_model_get_position(rhs.model_, rhs.iter_));
69 }69 }
7070
71 friend inline bool const operator>=(const ResultIterator& lhs, const ResultIterator& rhs)71 friend inline bool operator>=(const ResultIterator& lhs, const ResultIterator& rhs)
72 {72 {
73 return (dee_model_get_position(lhs.model_, lhs.iter_) >= dee_model_get_position(rhs.model_, rhs.iter_));73 return (dee_model_get_position(lhs.model_, lhs.iter_) >= dee_model_get_position(rhs.model_, rhs.iter_));
74 }74 }
75 75
76 friend inline bool const operator==(const ResultIterator& lhs, const ResultIterator& rhs)76 friend inline bool operator==(const ResultIterator& lhs, const ResultIterator& rhs)
77 {77 {
78 return (lhs.iter_ == rhs.iter_);78 return (lhs.iter_ == rhs.iter_);
79 }79 }
@@ -85,8 +85,8 @@
85 Result& operator*();85 Result& operator*();
8686
87 /* convenience methods */87 /* convenience methods */
88 bool const IsLast();88 bool IsLast();
89 bool const IsFirst();89 bool IsFirst();
9090
91private:91private:
92 glib::Object<DeeModel> model_;92 glib::Object<DeeModel> model_;