X-Git-Url: http://git.treefish.org/~alex/phys/latlib.git/blobdiff_plain/b13049b02df74e31a311cf41eb0c61f1898ce77e..da120f552639e7e742161a2a4d6f88ca5277df8e:/datread.cpp?ds=sidebyside diff --git a/datread.cpp b/datread.cpp index 41d3724..4a0e31d 100644 --- a/datread.cpp +++ b/datread.cpp @@ -26,22 +26,13 @@ int datread::openFile (const string& filename) getline(infile, parastring); } - if (inbuffer != NULL) - delete inbuffer; - - inbuffer = new boost::iostreams::filtering_istreambuf; + inbuffer = unique_ptr(new boost::iostreams::filtering_istreambuf); inbuffer->push( boost::iostreams::bzip2_decompressor() ); inbuffer->push(infile); return 0; } -datread::~datread () -{ - if (inbuffer != NULL) - delete inbuffer; -} - int datread::readDataToMem (char *tmpData, long unsigned int dataSize) { int readturn = -1;