BIND 10 trac510, updated. f84f26374fd7f359eafd98a00c9065d2c1aaa924 [510] use std::map instead of boost::unordered_map
BIND 10 source code commits
bind10-changes at lists.isc.org
Fri Dec 9 05:02:32 UTC 2011
The branch, trac510 has been updated
via f84f26374fd7f359eafd98a00c9065d2c1aaa924 (commit)
via 7a5214fa8a316a8096509226ff498ee1c39ec2de (commit)
from 1cd21e93810b18a4aa90d7d20afa6dbc3c0a8861 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit f84f26374fd7f359eafd98a00c9065d2c1aaa924
Author: Yoshitaka Aharen <aharen at jprs.co.jp>
Date: Fri Dec 9 13:58:57 2011 +0900
[510] use std::map instead of boost::unordered_map
boost/unordered_map.hpp is available since Boost 1.36. we should
consider to check if the header file is present with configure.
commit 7a5214fa8a316a8096509226ff498ee1c39ec2de
Author: Yoshitaka Aharen <aharen at jprs.co.jp>
Date: Fri Dec 9 13:56:32 2011 +0900
Revert "[510] do not use BOOST_FOREACH to address build failure on Mac OS X"
This reverts commit 1cd21e93810b18a4aa90d7d20afa6dbc3c0a8861.
-----------------------------------------------------------------------
Summary of changes:
src/lib/statistics/counter_dict.cc | 4 ++--
src/lib/statistics/tests/counter_dict_unittest.cc | 18 ++++++++----------
2 files changed, 10 insertions(+), 12 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/lib/statistics/counter_dict.cc b/src/lib/statistics/counter_dict.cc
index 7aa36a5..d40bd3f 100644
--- a/src/lib/statistics/counter_dict.cc
+++ b/src/lib/statistics/counter_dict.cc
@@ -1,15 +1,15 @@
#include <cassert>
#include <stdexcept>
#include <iterator>
+#include <map>
#include <boost/noncopyable.hpp>
#include <boost/shared_ptr.hpp>
-#include <boost/unordered_map.hpp>
#include <statistics/counter_dict.h>
namespace {
typedef boost::shared_ptr<isc::statistics::Counter> CounterPtr;
-typedef boost::unordered_map<std::string, CounterPtr> DictionaryMap;
+typedef std::map<std::string, CounterPtr> DictionaryMap;
}
namespace isc {
diff --git a/src/lib/statistics/tests/counter_dict_unittest.cc b/src/lib/statistics/tests/counter_dict_unittest.cc
index aa09597..d093e3d 100644
--- a/src/lib/statistics/tests/counter_dict_unittest.cc
+++ b/src/lib/statistics/tests/counter_dict_unittest.cc
@@ -118,22 +118,20 @@ TEST_F(CounterDictionaryTest, iteratorTest) {
// Walk through the elements with iterator
// Check if the elements "test" and "sub.test" appears only once
// and the counters have expected value
- for (CounterDictionary::ConstIterator i = counters.begin(),
- e = counters.end();
- i != e;
- ++i)
+ BOOST_FOREACH(CounterDictionary::ValueType i,
+ static_cast<const CounterDictionary &>(counters))
{
- if (i->name == "test" && element_test_visited == false) {
+ if (i.name == "test" && element_test_visited == false) {
element_test_visited = true;
// Check if the counters have expected value
- EXPECT_EQ(i->element.get(ITEM1), 1);
- EXPECT_EQ(i->element.get(ITEM2), 0);
- } else if (i->name == "sub.test" &&
+ EXPECT_EQ(i.element.get(ITEM1), 1);
+ EXPECT_EQ(i.element.get(ITEM2), 0);
+ } else if (i.name == "sub.test" &&
element_sub_test_visited == false) {
element_sub_test_visited = true;
// Check if the counters have expected value
- EXPECT_EQ(i->element.get(ITEM1), 0);
- EXPECT_EQ(i->element.get(ITEM2), 2);
+ EXPECT_EQ(i.element.get(ITEM1), 0);
+ EXPECT_EQ(i.element.get(ITEM2), 2);
} else {
// Test fails when reaches here: the element is not expected or
// the element appeared twice
More information about the bind10-changes
mailing list