Commit c5dc6d80675aa40f1d02dfabe87c39191f4895d1
1 parent
ff6971fb
Remove unused PointerHolder interface
Also fix a bug resulting from incorrect use of PointerHolder because of this unused parameter.
Showing
3 changed files
with
15 additions
and
3 deletions
ChangeLog
| 1 | +2017-08-10 Jay Berkenbilt <ejb@ql.org> | |
| 2 | + | |
| 3 | + * Remove unused "tracing" parameter from PointerHolder's | |
| 4 | + (T*, bool) constructor. This change breaks source code | |
| 5 | + compatibility, but since this argument to PointerHolder has not | |
| 6 | + used for a long time and the presence of a boolean parameter in | |
| 7 | + the primary constructor makes it too easy to use that by mistake | |
| 8 | + when trying to use PointerHolder for arrays, it seems like it's | |
| 9 | + finally time to take it out. If you have a compile error because | |
| 10 | + of this change, please check to see whether you intended to use | |
| 11 | + the (bool, T*) version of the constructor instead. If not, just | |
| 12 | + remove the second parameter. | |
| 13 | + | |
| 1 | 14 | 2017-08-05 Jay Berkenbilt <ejb@ql.org> |
| 2 | 15 | |
| 3 | 16 | * Add --single-pages option to cause output to be written to a | ... | ... |
include/qpdf/PointerHolder.hh
| ... | ... | @@ -69,8 +69,7 @@ class PointerHolder |
| 69 | 69 | }; |
| 70 | 70 | |
| 71 | 71 | public: |
| 72 | - // "tracing" is not used but is kept for interface backward compatbility | |
| 73 | - PointerHolder(T* pointer = 0, bool tracing = false) | |
| 72 | + PointerHolder(T* pointer = 0) | |
| 74 | 73 | { |
| 75 | 74 | this->init(new Data(pointer, false)); |
| 76 | 75 | } | ... | ... |
qpdf/qpdf.cc
| ... | ... | @@ -1103,7 +1103,7 @@ static void read_args_from_file(char const* filename, |
| 1103 | 1103 | iter != lines.end(); ++iter) |
| 1104 | 1104 | { |
| 1105 | 1105 | new_argv.push_back( |
| 1106 | - PointerHolder<char>(QUtil::copy_string((*iter).c_str()), true)); | |
| 1106 | + PointerHolder<char>(true, QUtil::copy_string((*iter).c_str()))); | |
| 1107 | 1107 | } |
| 1108 | 1108 | } |
| 1109 | 1109 | ... | ... |