diff options
Diffstat (limited to 'libtests')
-rw-r--r-- | libtests/concatenate.cc | 4 | ||||
-rw-r--r-- | libtests/input_source.cc | 4 | ||||
-rw-r--r-- | libtests/qutil.cc | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/libtests/concatenate.cc b/libtests/concatenate.cc index 41f88eb6..16850d03 100644 --- a/libtests/concatenate.cc +++ b/libtests/concatenate.cc @@ -20,12 +20,12 @@ int main(int argc, char* argv[]) pipeStringAndFinish(&concat, "-two-"); concat.manualFinish(); - PointerHolder<Buffer> b1_buf = b1.getBuffer(); + auto b1_buf = b1.getBufferSharedPointer(); Pl_Buffer b2("uncompressed"); Pl_Flate inflate("uncompress", &b2, Pl_Flate::a_inflate); inflate.write(b1_buf->getBuffer(), b1_buf->getSize()); inflate.finish(); - PointerHolder<Buffer> b2_buf = b2.getBuffer(); + auto b2_buf = b2.getBufferSharedPointer(); std::string result(reinterpret_cast<char*>(b2_buf->getBuffer()), b2_buf->getSize()); if (result == "-one--two-") diff --git a/libtests/input_source.cc b/libtests/input_source.cc index 5a69f295..9e72bbf6 100644 --- a/libtests/input_source.cc +++ b/libtests/input_source.cc @@ -65,8 +65,8 @@ int main() // Overlap so that the first check() would advance past the start // of the next match memcpy(b + 2037, "potato potato salad ", 20); - PointerHolder<InputSource> is = - new BufferInputSource("test buffer input source", b1.get()); + auto is = PointerHolder<InputSource>( + new BufferInputSource("test buffer input source", b1.get())); Finder f1(is, "salad"); check("find potato salad", true, is->findFirst("potato", 0, 0, f1)); diff --git a/libtests/qutil.cc b/libtests/qutil.cc index dcea9fd6..75cd47b3 100644 --- a/libtests/qutil.cc +++ b/libtests/qutil.cc @@ -545,7 +545,7 @@ void read_from_file_test() Pl_Buffer b2("buffer"); // QUtil::file_provider also exercises QUtil::pipe_file QUtil::file_provider("other-file")(&b2); - PointerHolder<Buffer> buf2 = b2.getBuffer(); + auto buf2 = b2.getBufferSharedPointer(); assert(buf2->getSize() == size); assert(memcmp(buf2->getBuffer(), p, size) == 0); } |