aboutsummaryrefslogtreecommitdiffstats
path: root/libtests
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2022-02-06 17:40:24 +0100
committerJay Berkenbilt <ejb@ql.org>2022-02-07 23:38:22 +0100
commitc62e8e2b285b9b401d6add5a7a0da98c7ea86373 (patch)
tree040e8fa45d6b459200e57e26fbacad6ddd7414f1 /libtests
parent3f22bea084d8d64cba1a433726abd709caf8456b (diff)
downloadqpdf-c62e8e2b285b9b401d6add5a7a0da98c7ea86373.tar.zst
Update for clean compile with POINTERHOLDER_TRANSITION=2
Diffstat (limited to 'libtests')
-rw-r--r--libtests/concatenate.cc4
-rw-r--r--libtests/input_source.cc4
-rw-r--r--libtests/qutil.cc2
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);
}