2
1
mirror of https://github.com/qpdf/qpdf.git synced 2025-01-03 15:17:29 +00:00

Enable PointerHolder warning and define POINTERHOLDER_IS_SHARED_POINTER

This commit is contained in:
Jay Berkenbilt 2022-04-09 15:55:08 -04:00
parent 128e41648f
commit ef2b84c6c3

View File

@ -22,16 +22,16 @@
#ifndef POINTERHOLDER_HH #ifndef POINTERHOLDER_HH
#define POINTERHOLDER_HH #define POINTERHOLDER_HH
#define POINTERHOLDER_IS_SHARED_POINTER
#ifndef POINTERHOLDER_TRANSITION #ifndef POINTERHOLDER_TRANSITION
// In qpdf 11, #define POINTERHOLDER_IS_SHARED_POINTER
// In qpdf 11, issue a warning:
// #define POINTERHOLDER_TRANSITION 0 to suppress this warning, and see below. // #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 // undefined = define as 0 and issue a warning
// 0 = no deprecation warnings // 0 = no deprecation warnings, backward-compatible API
// 1 = make PointerHolder<T>(T*) explicit // 1 = make PointerHolder<T>(T*) explicit
// 2 = warn for use of getPointer() and getRefcount() // 2 = warn for use of getPointer() and getRefcount()
// 3 = warn for all use of PointerHolder // 3 = warn for all use of PointerHolder