Browse Source

[2850] Remove unnecessary use of scoped_ptr

Mukund Sivaraman 12 years ago
parent
commit
a7dac3f7ff

+ 10 - 17
src/lib/datasrc/tests/memory/zone_loader_util.cc

@@ -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

+ 6 - 7
src/lib/datasrc/tests/zone_finder_context_unittest.cc

@@ -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));