summaryrefslogtreecommitdiffabout
path: root/include
authorMichael Krelin <hacker@klever.net>2008-06-27 21:00:41 (UTC)
committer Michael Krelin <hacker@klever.net>2008-06-27 21:00:41 (UTC)
commit362678728b8232c9490e14ba14ff323d9a92d6be (patch) (unidiff)
tree105675f96fff87916b2fdea8b51ad9fe98c5531d /include
parenta344edbdddeac51524001faa10d06f85cfdb041c (diff)
downloadlibopkele-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>
Diffstat (limited to 'include') (more/less context) (ignore whitespace changes)
-rw-r--r--include/opkele/iterator.h4
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
@@ -146,37 +146,37 @@ namespace opkele {
146 bool operator!=(const basic_filterator<IT>& x) const { 146 bool operator!=(const basic_filterator<IT>& x) const {
147 return empty!=x.empty || it!=x.it; } 147 return empty!=x.empty || it!=x.it; }
148 148
149 typename IT::reference operator*() const { 149 typename IT::reference operator*() const {
150 assert(!empty); 150 assert(!empty);
151 return *it; } 151 return *it; }
152 typename IT::pointer operator->() const { 152 typename IT::pointer operator->() const {
153 assert(!empty); 153 assert(!empty);
154 return it.operator->(); } 154 return it.operator->(); }
155 155
156 basic_filterator<IT>& operator++() { 156 basic_filterator<IT>& operator++() {
157 bool found = false; 157 bool found = false;
158 for(++it;!(it==ei || (found=is_interesting()));++it); 158 for(++it;!(it==ei || (found=is_interesting()));++it) ;
159 if(!found) empty=true; 159 if(!found) empty=true;
160 return *this; 160 return *this;
161 } 161 }
162 basic_filterator<IT> operator++(int) { 162 basic_filterator<IT> operator++(int) {
163 basic_filterator<IT> rv(*this); 163 basic_filterator<IT> rv(*this);
164 ++(*this); 164 ++(*this);
165 return rv; 165 return rv;
166 } 166 }
167 167
168 void prepare() { 168 void prepare() {
169 bool found = false; 169 bool found = false;
170 for(;!(it==ei || (found=is_interesting()));++it); 170 for(;!(it==ei || (found=is_interesting()));++it) ;
171 if(!found) empty = true; 171 if(!found) empty = true;
172 } 172 }
173 virtual bool is_interesting() const = 0; 173 virtual bool is_interesting() const = 0;
174 }; 174 };
175 175
176 template<typename IT,typename T=typename IT::value_type::first_type,typename TR=T&,typename TP=T*> 176 template<typename IT,typename T=typename IT::value_type::first_type,typename TR=T&,typename TP=T*>
177 class map_keys_iterator : public iterator< 177 class map_keys_iterator : public iterator<
178 typename IT::iterator_category, 178 typename IT::iterator_category,
179 T,void,TP,TR> { 179 T,void,TP,TR> {
180 public: 180 public:
181 typedef map_keys_iterator<IT,T,TR,TP> self_type; 181 typedef map_keys_iterator<IT,T,TR,TP> self_type;
182 IT it; 182 IT it;