summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2022-04-09 21:55:08 +0200
committerJay Berkenbilt <ejb@ql.org>2022-04-09 23:33:29 +0200
commitef2b84c6c3af434882a192f2122e2dee3fbe5499 (patch)
treedf1cf4321600ee4a92dcd5f8b4ba660ee6eaaa5f /include
parent128e41648f10659336f5e017a2bfa7b697957b98 (diff)
downloadqpdf-ef2b84c6c3af434882a192f2122e2dee3fbe5499.tar.zst
Enable PointerHolder warning and define POINTERHOLDER_IS_SHARED_POINTER
Diffstat (limited to 'include')
-rw-r--r--include/qpdf/PointerHolder.hh12
1 files changed, 6 insertions, 6 deletions
diff --git a/include/qpdf/PointerHolder.hh b/include/qpdf/PointerHolder.hh
index b51ca7ba..f0a513cb 100644
--- a/include/qpdf/PointerHolder.hh
+++ b/include/qpdf/PointerHolder.hh
@@ -22,16 +22,16 @@
#ifndef POINTERHOLDER_HH
#define POINTERHOLDER_HH
-#ifndef POINTERHOLDER_TRANSITION
+#define POINTERHOLDER_IS_SHARED_POINTER
-// In qpdf 11, #define POINTERHOLDER_IS_SHARED_POINTER
+#ifndef POINTERHOLDER_TRANSITION
-// In qpdf 11, issue a warning:
// #define POINTERHOLDER_TRANSITION 0 to suppress this warning, and see below.
-// # warn "POINTERHOLDER_TRANSITION is not defined -- see qpdf/PointerHolder.hh"
+// See also https://qpdf.readthedocs.io/en/stable/design.html#smart-pointers
+# warn "POINTERHOLDER_TRANSITION is not defined -- see qpdf/PointerHolder.hh"
-// undefined = define as 0; will also issue a warning in qpdf 11
-// 0 = no deprecation warnings
+// undefined = define as 0 and issue a warning
+// 0 = no deprecation warnings, backward-compatible API
// 1 = make PointerHolder<T>(T*) explicit
// 2 = warn for use of getPointer() and getRefcount()
// 3 = warn for all use of PointerHolder