]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2850] Remove unnecessary use of scoped_ptr
authorMukund Sivaraman <muks@isc.org>
Wed, 8 May 2013 11:38:53 +0000 (17:08 +0530)
committerMukund Sivaraman <muks@isc.org>
Wed, 8 May 2013 11:38:53 +0000 (17:08 +0530)
src/lib/datasrc/tests/memory/zone_loader_util.cc
src/lib/datasrc/tests/zone_finder_context_unittest.cc

index 0075a65cdc959b52f772437a779f6d7827f6f4b5..bd55e6660db35e4ce44a8f1fb147ca4ad23f0733 100644 (file)
@@ -24,9 +24,6 @@
 
 #include <cc/data.h>
 
-#include <boost/bind.hpp>
-#include <boost/scoped_ptr.hpp>
-
 #include <string>
 
 namespace isc {
@@ -43,13 +40,11 @@ loadZoneIntoTable(ZoneTableSegment& zt_sgmt, const dns::Name& zname,
             "{\"cache-enable\": true,"
             " \"params\": {\"" + zname.toText() + "\": \"" + zone_file +
             "\"}}"), true);
-    boost::scoped_ptr<memory::ZoneWriter> writer(
-        new memory::ZoneWriter(zt_sgmt,
-                               cache_conf.getLoadAction(zclass, zname),
-                               zname, zclass));
-    writer->load();
-    writer->install();
-    writer->cleanup();
+    memory::ZoneWriter writer(zt_sgmt, cache_conf.getLoadAction(zclass, zname),
+                              zname, zclass);
+    writer.load();
+    writer.install();
+    writer.cleanup();
 }
 
 namespace {
@@ -76,13 +71,11 @@ void
 loadZoneIntoTable(ZoneTableSegment& zt_sgmt, const dns::Name& zname,
                   const dns::RRClass& zclass, ZoneIterator& iterator)
 {
-    boost::scoped_ptr<memory::ZoneWriter> writer(
-        new memory::ZoneWriter(zt_sgmt,
-                               IteratorLoader(zclass, zname, iterator),
-                               zname, zclass));
-    writer->load();
-    writer->install();
-    writer->cleanup();
+    memory::ZoneWriter writer(zt_sgmt, IteratorLoader(zclass, zname, iterator),
+                              zname, zclass);
+    writer.load();
+    writer.install();
+    writer.cleanup();
 }
 
 } // namespace test
index 409bdefde083680571c3bd53b21922c192d6f526..9166c75339e76ca694888caf13d4494f25a5c1b5 100644 (file)
@@ -79,13 +79,12 @@ createInMemoryClient(RRClass zclass, const Name& zname) {
             string(TEST_ZONE_FILE) + "\"}}"), true);
     shared_ptr<ZoneTableSegment> ztable_segment(
         ZoneTableSegment::create(zclass, cache_conf.getSegmentType()));
-    scoped_ptr<memory::ZoneWriter> writer(
-        new memory::ZoneWriter(*ztable_segment,
-                               cache_conf.getLoadAction(zclass, zname),
-                               zname, zclass));
-    writer->load();
-    writer->install();
-    writer->cleanup();
+    memory::ZoneWriter writer(*ztable_segment,
+                              cache_conf.getLoadAction(zclass, zname),
+                              zname, zclass);
+    writer.load();
+    writer.install();
+    writer.cleanup();
     shared_ptr<InMemoryClient> client(new InMemoryClient(ztable_segment,
                                                          zclass));