From: John L. <mov...@us...> - 2003-08-11 21:18:43
|
Update of /cvsroot/oprofile/oprofile/libutil++ In directory sc8-pr-cvs1:/tmp/cvs-serv27702/libutil++ Modified Files: Tag: BRANCH_CALLGRAPH comma_list.h op_bfd.cpp Log Message: Merge from HEAD (plus some conflicts resolved) Index: comma_list.h =================================================================== RCS file: /cvsroot/oprofile/oprofile/libutil++/comma_list.h,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -u -p -d -r1.2 -r1.2.2.1 --- comma_list.h 29 May 2003 00:53:50 -0000 1.2 +++ comma_list.h 11 Aug 2003 21:18:40 -0000 1.2.2.1 @@ -43,7 +43,7 @@ public: * * return true if value match one the stored value in items */ - bool match(T value) const; + bool match(T const & value) const; /** * @param value the value to test @@ -97,6 +97,24 @@ void comma_list<T>::set(std::string cons } items.push_back(lexical_cast_no_ws<T>(result[i])); } +} + + +template <class T> +bool comma_list<T>::match(T const & value) const +{ + if (is_all) + return true; + + const_iterator cit = items.begin(); + const_iterator const end = items.end(); + + for (; cit != end; ++cit) { + if (value == *cit) + return true; + } + + return false; } Index: op_bfd.cpp =================================================================== RCS file: /cvsroot/oprofile/oprofile/libutil++/op_bfd.cpp,v retrieving revision 1.24.2.5 retrieving revision 1.24.2.6 diff -u -p -d -r1.24.2.5 -r1.24.2.6 --- op_bfd.cpp 3 Aug 2003 19:22:01 -0000 1.24.2.5 +++ op_bfd.cpp 11 Aug 2003 21:18:40 -0000 1.24.2.6 @@ -118,7 +118,7 @@ op_bfd::~op_bfd() } -bool op_bfd_symbol::operator<(op_bfd_symbol const& rhs) const +bool op_bfd_symbol::operator<(op_bfd_symbol const & rhs) const { return filepos() < rhs.filepos(); } |