diff --git a/Utils/Logger/Target.cc b/Utils/Logger/Target.cc index 75927e2b661c6a87b7964ff00e01ed39d3b5a59f..068631c7df3e5cbbd7d4778d33c7441f422437f2 100644 --- a/Utils/Logger/Target.cc +++ b/Utils/Logger/Target.cc @@ -112,7 +112,7 @@ prefix_ void senf::log::Target::unroute(int index) updateRoutingCache(entry.stream_, entry.area_); } -prefix_ void senf::log::Target::clear() +prefix_ void senf::log::Target::flush() { RIB old; rib_.swap(old); diff --git a/Utils/Logger/Target.cci b/Utils/Logger/Target.cci index 014f64cd5b5848a21f436c6c53269d4883e04537..10e58ab352e51a503f66171eb8e144e6fff629fc 100644 --- a/Utils/Logger/Target.cci +++ b/Utils/Logger/Target.cci @@ -88,6 +88,7 @@ prefix_ senf::log::Target::RoutingEntry::RoutingEntry() {} prefix_ bool senf::log::Target::RoutingEntry::operator==(RoutingEntry const & other) + const { return stream_ == other.stream_ && diff --git a/Utils/Logger/Target.hh b/Utils/Logger/Target.hh index 502bae810eb68fa6076b41b51181bc20935a3971..9065ef4c4075a511344665c906ab4478700702f4 100644 --- a/Utils/Logger/Target.hh +++ b/Utils/Logger/Target.hh @@ -160,7 +160,7 @@ namespace log { # endif RoutingEntry(); - bool operator==(RoutingEntry const & other); + bool operator==(RoutingEntry const & other) const; private: RoutingEntry(detail::StreamBase const * stream, detail::AreaBase const * area, @@ -338,7 +338,7 @@ namespace log { size_type size() const; ///< Number of routing table entries bool empty() const; ///< \c true, if routing table empty, \c false otherwise - void clear(); ///< Clear routing table + void flush(); ///< Clear routing table private: void route(detail::StreamBase const * stream, detail::AreaBase const * area, diff --git a/Utils/Logger/Target.test.cc b/Utils/Logger/Target.test.cc index b19f03f378227964f6153ef6c9800b2cd0ef6721..090af84c8e59dcff6957a1c455d2be97a84d9167 100644 --- a/Utils/Logger/Target.test.cc +++ b/Utils/Logger/Target.test.cc @@ -86,7 +86,7 @@ BOOST_AUTO_UNIT_TEST(target) }; BOOST_CHECK_EQUAL_COLLECTIONS( i, i_end, data, data + sizeof(data)/sizeof(data[0]) ); - BOOST_CHECK_EQUAL( *target.begin(), target[0] ); + BOOST_CHECK( *target.begin() == target[0] ); target.unroute<senf::log::Debug>(); target.unroute<senf::log::test::myStream, senf::log::VERBOSE>(); @@ -94,11 +94,11 @@ BOOST_AUTO_UNIT_TEST(target) target.unroute("senf::log::test::myStream", "", senf::log::IMPORTANT::value, senf::log::Target::REJECT); target.unroute(1); - target.clear(); + target.flush(); BOOST_CHECK( target.begin() == target.end() ); BOOST_CHECK( target.empty() ); - BOOST_CHECK( target.size() == 0 ); + BOOST_CHECK_EQUAL( target.size(), 0u ); } ///////////////////////////////cc.e////////////////////////////////////////