diff options
author | Jay Berkenbilt <ejb@ql.org> | 2017-08-11 00:17:24 +0200 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2017-08-11 01:01:38 +0200 |
commit | c5dc6d80675aa40f1d02dfabe87c39191f4895d1 (patch) | |
tree | f3b763cac0bcaedbadf18a1088ebe32a33d59a7f | |
parent | ff6971fb1cba7ff88eeb0538d3d6cf5268add05f (diff) | |
download | qpdf-c5dc6d80675aa40f1d02dfabe87c39191f4895d1.tar.zst |
Remove unused PointerHolder interface
Also fix a bug resulting from incorrect use of PointerHolder because
of this unused parameter.
-rw-r--r-- | ChangeLog | 13 | ||||
-rw-r--r-- | include/qpdf/PointerHolder.hh | 3 | ||||
-rw-r--r-- | qpdf/qpdf.cc | 2 |
3 files changed, 15 insertions, 3 deletions
@@ -1,3 +1,16 @@ +2017-08-10 Jay Berkenbilt <ejb@ql.org> + + * Remove unused "tracing" parameter from PointerHolder's + (T*, bool) constructor. This change breaks source code + compatibility, but since this argument to PointerHolder has not + used for a long time and the presence of a boolean parameter in + the primary constructor makes it too easy to use that by mistake + when trying to use PointerHolder for arrays, it seems like it's + finally time to take it out. If you have a compile error because + of this change, please check to see whether you intended to use + the (bool, T*) version of the constructor instead. If not, just + remove the second parameter. + 2017-08-05 Jay Berkenbilt <ejb@ql.org> * Add --single-pages option to cause output to be written to a diff --git a/include/qpdf/PointerHolder.hh b/include/qpdf/PointerHolder.hh index 856897d4..7a2a3b83 100644 --- a/include/qpdf/PointerHolder.hh +++ b/include/qpdf/PointerHolder.hh @@ -69,8 +69,7 @@ class PointerHolder }; public: - // "tracing" is not used but is kept for interface backward compatbility - PointerHolder(T* pointer = 0, bool tracing = false) + PointerHolder(T* pointer = 0) { this->init(new Data(pointer, false)); } diff --git a/qpdf/qpdf.cc b/qpdf/qpdf.cc index 86753945..604b8363 100644 --- a/qpdf/qpdf.cc +++ b/qpdf/qpdf.cc @@ -1103,7 +1103,7 @@ static void read_args_from_file(char const* filename, iter != lines.end(); ++iter) { new_argv.push_back( - PointerHolder<char>(QUtil::copy_string((*iter).c_str()), true)); + PointerHolder<char>(true, QUtil::copy_string((*iter).c_str()))); } } |