author | Michael Krelin <hacker@klever.net> | 2008-06-27 21:00:41 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2008-06-27 21:00:41 (UTC) |
commit | 362678728b8232c9490e14ba14ff323d9a92d6be (patch) (side-by-side diff) | |
tree | 105675f96fff87916b2fdea8b51ad9fe98c5531d /include/opkele | |
parent | a344edbdddeac51524001faa10d06f85cfdb041c (diff) | |
download | libopkele-362678728b8232c9490e14ba14ff323d9a92d6be.zip libopkele-362678728b8232c9490e14ba14ff323d9a92d6be.tar.gz libopkele-362678728b8232c9490e14ba14ff323d9a92d6be.tar.bz2 |
made gcc 4.3 a bit happier
Signed-off-by: Michael Krelin <hacker@klever.net>
-rw-r--r-- | include/opkele/iterator.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/opkele/iterator.h b/include/opkele/iterator.h index 28c1c83..8f86234 100644 --- a/include/opkele/iterator.h +++ b/include/opkele/iterator.h @@ -142,45 +142,45 @@ namespace opkele { virtual ~basic_filterator() { } bool operator==(const basic_filterator<IT>& x) const { return empty?x.empty:(it==x.it); } bool operator!=(const basic_filterator<IT>& x) const { return empty!=x.empty || it!=x.it; } typename IT::reference operator*() const { assert(!empty); return *it; } typename IT::pointer operator->() const { assert(!empty); return it.operator->(); } basic_filterator<IT>& operator++() { bool found = false; - for(++it;!(it==ei || (found=is_interesting()));++it); + for(++it;!(it==ei || (found=is_interesting()));++it) ; if(!found) empty=true; return *this; } basic_filterator<IT> operator++(int) { basic_filterator<IT> rv(*this); ++(*this); return rv; } void prepare() { bool found = false; - for(;!(it==ei || (found=is_interesting()));++it); + for(;!(it==ei || (found=is_interesting()));++it) ; if(!found) empty = true; } virtual bool is_interesting() const = 0; }; template<typename IT,typename T=typename IT::value_type::first_type,typename TR=T&,typename TP=T*> class map_keys_iterator : public iterator< typename IT::iterator_category, T,void,TP,TR> { public: typedef map_keys_iterator<IT,T,TR,TP> self_type; IT it; IT ei; bool empty; map_keys_iterator() : empty(true) { } |