Commit ef2b84c6c3af434882a192f2122e2dee3fbe5499
1 parent
128e4164
Enable PointerHolder warning and define POINTERHOLDER_IS_SHARED_POINTER
Showing
1 changed file
with
6 additions
and
6 deletions
include/qpdf/PointerHolder.hh
| @@ -22,16 +22,16 @@ | @@ -22,16 +22,16 @@ | ||
| 22 | #ifndef POINTERHOLDER_HH | 22 | #ifndef POINTERHOLDER_HH |
| 23 | #define POINTERHOLDER_HH | 23 | #define POINTERHOLDER_HH |
| 24 | 24 | ||
| 25 | -#ifndef POINTERHOLDER_TRANSITION | 25 | +#define POINTERHOLDER_IS_SHARED_POINTER |
| 26 | 26 | ||
| 27 | -// In qpdf 11, #define POINTERHOLDER_IS_SHARED_POINTER | 27 | +#ifndef POINTERHOLDER_TRANSITION |
| 28 | 28 | ||
| 29 | -// In qpdf 11, issue a warning: | ||
| 30 | // #define POINTERHOLDER_TRANSITION 0 to suppress this warning, and see below. | 29 | // #define POINTERHOLDER_TRANSITION 0 to suppress this warning, and see below. |
| 31 | -// # warn "POINTERHOLDER_TRANSITION is not defined -- see qpdf/PointerHolder.hh" | 30 | +// See also https://qpdf.readthedocs.io/en/stable/design.html#smart-pointers |
| 31 | +# warn "POINTERHOLDER_TRANSITION is not defined -- see qpdf/PointerHolder.hh" | ||
| 32 | 32 | ||
| 33 | -// undefined = define as 0; will also issue a warning in qpdf 11 | ||
| 34 | -// 0 = no deprecation warnings | 33 | +// undefined = define as 0 and issue a warning |
| 34 | +// 0 = no deprecation warnings, backward-compatible API | ||
| 35 | // 1 = make PointerHolder<T>(T*) explicit | 35 | // 1 = make PointerHolder<T>(T*) explicit |
| 36 | // 2 = warn for use of getPointer() and getRefcount() | 36 | // 2 = warn for use of getPointer() and getRefcount() |
| 37 | // 3 = warn for all use of PointerHolder | 37 | // 3 = warn for all use of PointerHolder |