--- parser3/src/include/pa_table.h 2003/09/25 09:15:02 1.53 +++ parser3/src/include/pa_table.h 2006/11/02 12:07:25 1.61 @@ -1,14 +1,14 @@ /** @file Parser: table class decl. - Copyright (c) 2001-2003 ArtLebedev Group (http://www.artlebedev.com) + Copyright (c) 2001-2005 ArtLebedev Group (http://www.artlebedev.com) Author: Alexandr Petrosian (http://paf.design.ru) */ #ifndef PA_TABLE_H #define PA_TABLE_H -static const char* IDENT_TABLE_H="$Date: 2003/09/25 09:15:02 $"; +static const char * const IDENT_TABLE_H="$Date: 2006/11/02 12:07:25 $"; #include "pa_types.h" #include "pa_hash.h" @@ -89,15 +89,15 @@ public: } template - bool table_first_that(bool (*func)(Table& self, I* info), void* info, Action_options& o) { + bool table_first_that(bool (*func)(Table& self, I info), I info, Action_options& o) { if(!o.adjust(count())) return false; size_t saved_current=current(); size_t row=o.offset; if(o.reverse) { // reverse - for(size_t to=row-o.limit; row>=to; --row) { - set_current(row); + for(size_t i=0; i<=o.limit; i++) { + set_current(o.offset-i); if(func(*this, info)) return true; @@ -132,7 +132,7 @@ private: name2number_hash_class* name2number; /// is that @c index falid? - bool valid(size_t index) const { return index>=0 && index