Commit a7dac3f7 authored by Mukund Sivaraman's avatar Mukund Sivaraman
Browse files

[2850] Remove unnecessary use of scoped_ptr

parent e6d1be1a
......@@ -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
......
......@@ -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));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment