diff options
| author | Michal Hruby <michal.mhr@gmail.com> | 2012-08-13 10:18:25 +0200 |
|---|---|---|
| committer | Michal Hruby <michal.mhr@gmail.com> | 2012-08-13 10:18:25 +0200 |
| commit | a3f26082c0f0f8b0e8c4d639980803515ea89bf1 (patch) | |
| tree | 454bbdcced3d9f6b3fcd76c21b2efee44d0bf4e1 /UnityCore | |
| parent | 67188281f5098fc91fb78753eeb766290a59c85c (diff) | |
Make ResultIterator operator* return non-const Result, this lowers the number of copies we need considerably
(bzr r2547.3.5)
Diffstat (limited to 'UnityCore')
| -rw-r--r-- | UnityCore/ResultIterator.cpp | 2 | ||||
| -rw-r--r-- | UnityCore/ResultIterator.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/UnityCore/ResultIterator.cpp b/UnityCore/ResultIterator.cpp index d4a5d1971..aa569e952 100644 --- a/UnityCore/ResultIterator.cpp +++ b/UnityCore/ResultIterator.cpp @@ -129,7 +129,7 @@ ResultIterator ResultIterator::operator-(int count) const return tmp; } -Result const& ResultIterator::operator*() +Result& ResultIterator::operator*() { if (cache_invalidated_) iter_result_ = Result(model_, iter_, tag_); diff --git a/UnityCore/ResultIterator.h b/UnityCore/ResultIterator.h index a68aafb8f..402357390 100644 --- a/UnityCore/ResultIterator.h +++ b/UnityCore/ResultIterator.h @@ -82,7 +82,7 @@ public: { return !(lhs == rhs); } - Result const& operator*(); + Result& operator*(); /* convenience methods */ bool const IsLast(); |
