BIND 10 trac1057, updated. b3a9a4228b95713636958a12f625434ef3cc3277 [trac1057] it turned out logcheck.h had the same problem. applied the same sense of fixes (introducing a separate named namespace; avoid 'using namespace' in the header file).
BIND 10 source code commits
bind10-changes at lists.isc.org
Tue Jun 28 01:31:37 UTC 2011
The branch, trac1057 has been updated
via b3a9a4228b95713636958a12f625434ef3cc3277 (commit)
from 1cbcbc84256489b664fe90553d3bb3579a33946c (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 b3a9a4228b95713636958a12f625434ef3cc3277
Author: JINMEI Tatuya <jinmei at isc.org>
Date: Mon Jun 27 18:30:49 2011 -0700
[trac1057] it turned out logcheck.h had the same problem. applied the
same sense of fixes (introducing a separate named namespace; avoid
'using namespace' in the header file).
-----------------------------------------------------------------------
Summary of changes:
src/lib/acl/tests/acl_test.cc | 8 +++++++-
src/lib/acl/tests/loader_test.cc | 1 +
src/lib/acl/tests/logcheck.h | 17 ++++++++++-------
3 files changed, 18 insertions(+), 8 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/lib/acl/tests/acl_test.cc b/src/lib/acl/tests/acl_test.cc
index 5829fe7..15ffef6 100644
--- a/src/lib/acl/tests/acl_test.cc
+++ b/src/lib/acl/tests/acl_test.cc
@@ -12,8 +12,14 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
+#include <boost/shared_ptr.hpp>
+
#include "logcheck.h"
+using namespace isc::acl;
+using namespace isc::acl::tests;
+using boost::shared_ptr;
+
namespace {
// Test version of the Acl class. It adds few methods to examine the protected
@@ -39,7 +45,7 @@ public:
TestACL acl_;
Log log_;
size_t next_check_;
- shared_ptr<Check<Log> > getCheck(bool accepts) {
+ boost::shared_ptr<Check<Log> > getCheck(bool accepts) {
return (shared_ptr<Check<Log> >(new ConstCheck(accepts,
next_check_++)));
}
diff --git a/src/lib/acl/tests/loader_test.cc b/src/lib/acl/tests/loader_test.cc
index 73fc374..4415081 100644
--- a/src/lib/acl/tests/loader_test.cc
+++ b/src/lib/acl/tests/loader_test.cc
@@ -19,6 +19,7 @@
using namespace std;
using namespace boost;
+using namespace isc::acl;
using namespace isc::acl::tests;
using isc::data::Element;
using isc::data::ConstElementPtr;
diff --git a/src/lib/acl/tests/logcheck.h b/src/lib/acl/tests/logcheck.h
index 776ff53..424c53d 100644
--- a/src/lib/acl/tests/logcheck.h
+++ b/src/lib/acl/tests/logcheck.h
@@ -19,14 +19,11 @@
#include <acl/acl.h>
#include <cassert>
-// This is not a public header, it is used only inside the tests. Therefore
-// we lower the standards a bit and use anonymous namespace in the header
-// and "using", just for convenience. This is just to share little bit of code
-// between multiple tests.
-using namespace isc::acl;
-using boost::shared_ptr;
+// This is not a public header, it is used only inside the tests.
-namespace {
+namespace isc {
+namespace acl {
+namespace tests {
// This is arbitrary guess of size for the log. If it's too small for your
// test, just make it bigger.
@@ -87,5 +84,11 @@ private:
};
}
+}
+}
#endif
+
+// Local Variables:
+// mode: c++
+// End:
More information about the bind10-changes
mailing list