From c62e8e2b285b9b401d6add5a7a0da98c7ea86373 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Sun, 6 Feb 2022 11:40:24 -0500 Subject: Update for clean compile with POINTERHOLDER_TRANSITION=2 --- libtests/concatenate.cc | 4 ++-- libtests/input_source.cc | 4 ++-- libtests/qutil.cc | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'libtests') 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 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 b2_buf = b2.getBuffer(); + auto b2_buf = b2.getBufferSharedPointer(); std::string result(reinterpret_cast(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 is = - new BufferInputSource("test buffer input source", b1.get()); + auto is = PointerHolder( + 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 buf2 = b2.getBuffer(); + auto buf2 = b2.getBufferSharedPointer(); assert(buf2->getSize() == size); assert(memcmp(buf2->getBuffer(), p, size) == 0); } -- cgit v1.2.3-54-g00ecf