X-Git-Url: http://git.treefish.org/~alex/phys/latlib.git/blobdiff_plain/061e6469f58f3e3e892f1cd1f6fdd2aad9c644e8..07516f0b1615a95f3e68d073adf4cfda584b99fa:/datread.cpp?ds=inline 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;