Skip to content

Commit

Permalink
Merge pull request OSGeo#5392 from rouault/remove_debug_bool
Browse files Browse the repository at this point in the history
Remove remains of the DEBUG_BOOL mechanism
  • Loading branch information
rouault authored Mar 6, 2022
2 parents 25ce53f + 4a2ae78 commit 2004e5a
Show file tree
Hide file tree
Showing 48 changed files with 28 additions and 191 deletions.
4 changes: 0 additions & 4 deletions alg/gdallinearsystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@

/*! @cond Doxygen_Suppress */

#if defined(HAVE_ARMADILLO) && !defined(DO_NOT_USE_DEBUG_BOOL)
#define DO_NOT_USE_DEBUG_BOOL
#endif

#include "cpl_port.h"
#include "cpl_conv.h"
#include "gdallinearsystem.h"
Expand Down
3 changes: 0 additions & 3 deletions alg/gdaltransformer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
* DEALINGS IN THE SOFTWARE.
****************************************************************************/

#define DO_NOT_USE_DEBUG_BOOL // See TODO for bGCPUseOK.

#include "cpl_port.h"
#include "gdal_alg.h"
#include "gdal_alg_priv.h"
Expand Down Expand Up @@ -1697,7 +1695,6 @@ GDALCreateGenImgProjTransformer2( GDALDatasetH hSrcDS, GDALDatasetH hDstDS,
const int nOrder = pszValue ? atoi(pszValue) : 0;

pszValue = CSLFetchNameValue( papszOptions, "GCPS_OK" );
// TODO(schwehr): Why does this upset DEBUG_BOOL?
const bool bGCPUseOK = pszValue ? CPLTestBool(pszValue) : true;

pszValue = CSLFetchNameValue( papszOptions, "REFINE_MINIMUM_GCPS" );
Expand Down
2 changes: 1 addition & 1 deletion alg/gdalwarpkernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1395,7 +1395,7 @@ static void GWKOverlayDensity( const GDALWarpKernel *poWK, GPtrDiff_t iDstOffset
/* GWKRoundValueT() */
/************************************************************************/

template<class T, EMULATED_BOOL is_signed> struct sGWKRoundValueT
template<class T, bool is_signed> struct sGWKRoundValueT
{
static T eval(double);
};
Expand Down
2 changes: 0 additions & 2 deletions frmts/dods/dodsdataset2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
* DEALINGS IN THE SOFTWARE.
****************************************************************************/

#define DO_NOT_USE_DEBUG_BOOL

#include <string>
#include <sstream>
#include <algorithm>
Expand Down
2 changes: 1 addition & 1 deletion frmts/ecw/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ add_gdal_driver(
SOURCES ${SOURCE} DRIVER_NAME_OPTION ECW
DEF FRMT_ecw PLUGIN_CAPABLE)
gdal_standard_includes(gdal_ECW_JP2ECW)
target_compile_definitions(gdal_ECW_JP2ECW PRIVATE -DFRMT_ecw -DDO_NOT_USE_DEBUG_BOOL)
target_compile_definitions(gdal_ECW_JP2ECW PRIVATE -DFRMT_ecw)
gdal_target_link_libraries(gdal_ECW_JP2ECW PRIVATE ECW::ECW_ALL)
foreach (d IN LISTS ECW_INCLUDE_DIRS)
if (EXISTS "${d}/ECWJP2BuildNumber.h")
Expand Down
2 changes: 1 addition & 1 deletion frmts/ecw/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ include ../../GDALmake.opt
OBJ = ecwdataset.o ecwcreatecopy.o jp2userbox.o ecwasyncreader.o

CPPFLAGS := -DFRMT_ecw $(CPPFLAGS) \
$(ECW_FLAGS) $(ECW_INCLUDE) $(EXTRA_CFLAGS) -DDO_NOT_USE_DEBUG_BOOL
$(ECW_FLAGS) $(ECW_INCLUDE) $(EXTRA_CFLAGS)
PLUGIN_SO = gdal_ECW_JP2ECW.so

default: $(OBJ:.o=.$(OBJ_EXT))
Expand Down
4 changes: 2 additions & 2 deletions frmts/gtiff/geotiff.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1643,7 +1643,7 @@ class FetchBufferDirectIO final
return true;
}

static const EMULATED_BOOL bMinimizeIO = true;
static const bool bMinimizeIO = true;
};

/************************************************************************/
Expand Down Expand Up @@ -2415,7 +2415,7 @@ class FetchBufferVirtualMemIO final
return true;
}

static const EMULATED_BOOL bMinimizeIO = false;
static const bool bMinimizeIO = false;
};

/************************************************************************/
Expand Down
4 changes: 0 additions & 4 deletions frmts/jp2kak/jp2kakdataset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@
* DEALINGS IN THE SOFTWARE.
****************************************************************************/

#ifdef DEBUG_BOOL
#define DO_NOT_USE_DEBUG_BOOL
#endif

#include "cpl_port.h"
#include "jp2kakdataset.h"

Expand Down
4 changes: 0 additions & 4 deletions frmts/jp2kak/jp2kakdataset.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@

// $Id$

#ifdef DEBUG_BOOL
#define DO_NOT_USE_DEBUG_BOOL
#endif

#include <cstring>
#include <algorithm>
#include <cmath>
Expand Down
4 changes: 0 additions & 4 deletions frmts/jpipkak/jpipkakdataset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@
* DEALINGS IN THE SOFTWARE.
**/

#ifdef DEBUG_BOOL
#define DO_NOT_USE_DEBUG_BOOL
#endif

#include "gdal_frmts.h"
#include "jpipkakdataset.h"

Expand Down
1 change: 0 additions & 1 deletion frmts/kea/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ add_gdal_driver(
libkea_headers.h
PLUGIN_CAPABLE)
gdal_standard_includes(gdal_KEA)
target_compile_definitions(gdal_KEA PRIVATE -DDO_NOT_USE_DEBUG_BOOL)
target_include_directories(gdal_KEA PRIVATE ${HDF5_INCLUDE_DIRS})
gdal_target_link_libraries(gdal_KEA PRIVATE KEA::KEA ${HDF5_CXX_LIBRARIES})
if (HDF5_BUILD_SHARED_LIBS)
Expand Down
2 changes: 1 addition & 1 deletion frmts/kea/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ include ../../GDALmake.opt

OBJ = keaband.o keacopy.o keadataset.o keadriver.o keamaskband.o keaoverview.o kearat.o

CPPFLAGS := $(KEA_INC) $(CPPFLAGS) -DDO_NOT_USE_DEBUG_BOOL
CPPFLAGS := $(KEA_INC) $(CPPFLAGS)

default: $(OBJ:.o=.$(OBJ_EXT))

Expand Down
4 changes: 0 additions & 4 deletions frmts/mrsid/mrsiddataset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@
* DEALINGS IN THE SOFTWARE.
****************************************************************************/

#ifdef DEBUG_BOOL
#define DO_NOT_USE_DEBUG_BOOL
#endif

#define NO_DELETE

#include "cpl_string.h"
Expand Down
4 changes: 0 additions & 4 deletions frmts/mrsid/mrsidstream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@
* DEALINGS IN THE SOFTWARE.
****************************************************************************/

#ifdef DEBUG_BOOL
#define DO_NOT_USE_DEBUG_BOOL
#endif

#include "cpl_error.h"
#include "mrsidstream.h"

Expand Down
1 change: 0 additions & 1 deletion frmts/msg/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ add_gdal_driver(
xritheaderparser.h
PLUGIN_CAPABLE)
gdal_standard_includes(gdal_MSG)
target_compile_definitions(gdal_MSG PRIVATE -DDO_NOT_USE_DEBUG_BOOL)

set(PUBLICDECOMPWT_URL
"https://gitlab.eumetsat.int/open-source/PublicDecompWT.git"
Expand Down
2 changes: 1 addition & 1 deletion frmts/msg/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ include ../../GDALmake.opt

OBJ = msgdataset.o xritheaderparser.o prologue.o msgcommand.o reflectancecalculator.o PublicDecompWT_all.o

CPPFLAGS := -DDO_NOT_USE_DEBUG_BOOL -I PublicDecompWT/DISE -I PublicDecompWT/COMP/WT/Inc -I PublicDecompWT/COMP/Inc -iquote . $(CPPFLAGS)
CPPFLAGS := -I PublicDecompWT/DISE -I PublicDecompWT/COMP/WT/Inc -I PublicDecompWT/COMP/Inc -iquote . $(CPPFLAGS)

default: $(OBJ:.o=.$(OBJ_EXT))

Expand Down
2 changes: 1 addition & 1 deletion frmts/openjpeg/openjpegdataset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ class JobStruct
volatile int nCurPair;
int nBandCount;
int *panBandMap;
VOLATILE_BOOL bSuccess;
volatile bool bSuccess;
};

void JP2OpenJPEGDataset::JP2OpenJPEGReadBlockInThread(void* userdata)
Expand Down
2 changes: 1 addition & 1 deletion frmts/pdf/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ endif

$(O_OBJ): pdfobject.h pdfio.h pdfcreatecopy.h pdfcreatefromcomposition.h gdal_pdf.h ../../ogr/ogrsf_frmts/mem/ogr_mem.h

CPPFLAGS := -iquote ../vrt -iquote ../mem -iquote ../../ogr/ogrsf_frmts/mem $(CPPFLAGS) $(POPPLER_INC) $(PODOFO_INC) $(PDFIUM_INC) -DDO_NOT_USE_DEBUG_BOOL
CPPFLAGS := -iquote ../vrt -iquote ../mem -iquote ../../ogr/ogrsf_frmts/mem $(CPPFLAGS) $(POPPLER_INC) $(PODOFO_INC) $(PDFIUM_INC)

default: $(OBJ:.o=.$(OBJ_EXT))

Expand Down
1 change: 0 additions & 1 deletion ogr/ogr_xerces.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
* DEALINGS IN THE SOFTWARE.
****************************************************************************/

// Must be first for DEBUG_BOOL case
#include "ogr_xerces.h"

#include "cpl_port.h"
Expand Down
1 change: 0 additions & 1 deletion ogr/ogr_xerces.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#ifndef OGR_XERCES_INCLUDED
#define OGR_XERCES_INCLUDED

// Must be first for DEBUG_BOOL case
#ifdef HAVE_XERCES
#include "ogr_xerces_headers.h"
#endif
Expand Down
6 changes: 3 additions & 3 deletions ogr/ogrpgeogeometry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ struct CurveSegment
{
double dfX;
double dfY;
EMULATED_BOOL bIsCCW;
bool bIsCCW;
} ArcByCenterPoint;

struct
Expand All @@ -110,8 +110,8 @@ struct CurveSegment
double dfRotationDeg;
double dfSemiMajor;
double dfRatioSemiMinor;
EMULATED_BOOL bIsMinor;
EMULATED_BOOL bIsComplete;
bool bIsMinor;
bool bIsComplete;
} EllipseByCenter;
} u;
};
Expand Down
2 changes: 1 addition & 1 deletion ogr/ogrsf_frmts/dods/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ include ../../../GDALmake.opt
OBJ = ogrdodsdriver.o ogrdodsdatasource.o ogrdodslayer.o \
ogrdodssequencelayer.o ogrdodsfielddefn.o ogrdodsgrid.o

CPPFLAGS := -iquote .. $(CPPFLAGS) $(DODS_INC) $(LIBXML2_INC) -DDO_NOT_USE_DEBUG_BOOL
CPPFLAGS := -iquote .. $(CPPFLAGS) $(DODS_INC) $(LIBXML2_INC)

default: $(O_OBJ:.o=.$(OBJ_EXT))

Expand Down
1 change: 0 additions & 1 deletion ogr/ogrsf_frmts/dwg/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ else ()
endif ()

gdal_standard_includes(ogr_DWG_DGNV8)
target_compile_definitions(ogr_DWG_DGNV8 PRIVATE -DDO_NOT_USE_DEBUG_BOOL)
target_include_directories(ogr_DWG_DGNV8 PRIVATE $<TARGET_PROPERTY:ogr_DXF,SOURCE_DIR>)
gdal_target_link_libraries(ogr_DWG_DGNV8 PRIVATE TEIGHA::TEIGHA)
if (Threads_FOUND)
Expand Down
2 changes: 1 addition & 1 deletion ogr/ogrsf_frmts/dwg/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ OBJ = ogrdwgdriver.o ogrdwgdatasource.o ogrdwglayer.o \
ogrdgnv8driver.o ogrdgnv8datasource.o ogrdgnv8layer.o \
ogrteigha.o

CPPFLAGS := -iquote ../dxf $(TDXXFLAGS) $(CPPFLAGS) $(TEIGHA_CPPFLAGS) -DDO_NOT_USE_DEBUG_BOOL
CPPFLAGS := -iquote ../dxf $(TDXXFLAGS) $(CPPFLAGS) $(TEIGHA_CPPFLAGS)

default: $(O_OBJ:.o=.$(OBJ_EXT))

Expand Down
6 changes: 3 additions & 3 deletions ogr/ogrsf_frmts/dxf/intronurbs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ POSSIBILITY OF SUCH DAMAGE.

#include <stdio.h>
#include <vector>
#include "cpl_port.h" // in case of -DDEBUG_BOOL
#include "cpl_port.h"

CPL_CVSID("$Id$")

Expand Down Expand Up @@ -339,7 +339,7 @@ void rbspline2( int npts,int k,int p1,double b[],double h[],
b[1] contains the x-component of the vertex
b[2] contains the y-component of the vertex
b[3] contains the z-component of the vertex
h[] = array containing the homogeneous weighting factors
h[] = array containing the homogeneous weighting factors
k = order of the B-spline basis function
nbasis = array containing the basis functions for a single value of t
nplusc = number of knot values
Expand Down Expand Up @@ -379,7 +379,7 @@ void rbspline(int npts,int k,int p1,double b[],double h[], double p[])
b[1] contains the x-component of the vertex
b[2] contains the y-component of the vertex
b[3] contains the z-component of the vertex
h[] = array containing the homogeneous weighting factors
h[] = array containing the homogeneous weighting factors
k = order of the B-spline basis function
nbasis = array containing the basis functions for a single value of t
nplusc = number of knot values
Expand Down
4 changes: 0 additions & 4 deletions ogr/ogrsf_frmts/filegdb/ogr_fgdb.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@
#ifndef OGR_FGDB_H_INCLUDED
#define OGR_FGDB_H_INCLUDED

#ifdef DEBUG_BOOL
#define DO_NOT_USE_DEBUG_BOOL
#endif

#include <vector>
#include <set>
#include "ogrsf_frmts.h"
Expand Down
1 change: 0 additions & 1 deletion ogr/ogrsf_frmts/gml/gmlreaderp.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@

#if defined(HAVE_XERCES)

// Must be first for DEBUG_BOOL case
#include "xercesc_headers.h"
#include "ogr_xerces.h"

Expand Down
1 change: 0 additions & 1 deletion ogr/ogrsf_frmts/gmlas/ogr_gmlas.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#ifndef OGR_GMLAS_INCLUDED
#define OGR_GMLAS_INCLUDED

// Must be first for DEBUG_BOOL case
#include "xercesc_headers.h"
#include "ogr_xerces.h"

Expand Down
1 change: 0 additions & 1 deletion ogr/ogrsf_frmts/gmlas/ogrgmlasconf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
* DEALINGS IN THE SOFTWARE.
****************************************************************************/

// Must be first for DEBUG_BOOL case
#include "ogr_gmlas.h"

#define CONSTANT_DEFINITION
Expand Down
1 change: 0 additions & 1 deletion ogr/ogrsf_frmts/gmlas/ogrgmlasdatasource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
* DEALINGS IN THE SOFTWARE.
****************************************************************************/

// Must be first for DEBUG_BOOL case
#include "ogr_gmlas.h"

#include "ogr_mem.h"
Expand Down
1 change: 0 additions & 1 deletion ogr/ogrsf_frmts/gmlas/ogrgmlasdriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
* DEALINGS IN THE SOFTWARE.
****************************************************************************/

// Must be first for DEBUG_BOOL case
#include "ogr_gmlas.h"

// g++ -I/usr/include/json -DxDEBUG_VERBOSE -DDEBUG -g -DDEBUG -ftrapv -Wall -Wextra -Winit-self -Wunused-parameter -Wformat -Werror=format-security -Wno-format-nonliteral -Wlogical-op -Wshadow -Werror=vla -Wmissing-declarations -Wnon-virtual-dtor -Woverloaded-virtual -fno-operator-names ogr/ogrsf_frmts/gmlas/*.cpp -fPIC -shared -o ogr_GMLAS.so -Iport -Igcore -Iogr -Iogr/ogrsf_frmts -Iogr/ogrsf_frmts/mem -L. -lgdal -I/home/even/spatialys/eea/inspire_gml/install-xerces-c-3.1.3/include
Expand Down
1 change: 0 additions & 1 deletion ogr/ogrsf_frmts/gmlas/ogrgmlasfeatureclass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
* DEALINGS IN THE SOFTWARE.
****************************************************************************/

// Must be first for DEBUG_BOOL case
#include "ogr_gmlas.h"

CPL_CVSID("$Id$")
Expand Down
1 change: 0 additions & 1 deletion ogr/ogrsf_frmts/gmlas/ogrgmlaslayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
* DEALINGS IN THE SOFTWARE.
****************************************************************************/

// Must be first for DEBUG_BOOL case
#include "ogr_gmlas.h"
#include "ogr_pgdump.h"
#include "cpl_minixml.h"
Expand Down
1 change: 0 additions & 1 deletion ogr/ogrsf_frmts/gmlas/ogrgmlasreader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
* DEALINGS IN THE SOFTWARE.
****************************************************************************/

// Must be first for DEBUG_BOOL case
#include "ogr_gmlas.h"

#include "ogr_p.h"
Expand Down
1 change: 0 additions & 1 deletion ogr/ogrsf_frmts/gmlas/ogrgmlasschemaanalyzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
* DEALINGS IN THE SOFTWARE.
****************************************************************************/

// Must be first for DEBUG_BOOL case
#include "xercesc_headers.h"

// Hack to avoid bool, possibly redefined to pedantic bool class, being later used
Expand Down
1 change: 0 additions & 1 deletion ogr/ogrsf_frmts/gmlas/ogrgmlaswriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
* DEALINGS IN THE SOFTWARE.
****************************************************************************/

// Must be first for DEBUG_BOOL case
#include "ogr_gmlas.h"
#include "ogr_p.h"
#include "ogrgeojsonreader.h"
Expand Down
1 change: 0 additions & 1 deletion ogr/ogrsf_frmts/gmlas/ogrgmlasxlinkresolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
* DEALINGS IN THE SOFTWARE.
****************************************************************************/

// Must be first for DEBUG_BOOL case
#include "ogr_gmlas.h"

#include "cpl_http.h"
Expand Down
1 change: 0 additions & 1 deletion ogr/ogrsf_frmts/gmlas/ogrgmlasxpatchmatcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
* DEALINGS IN THE SOFTWARE.
****************************************************************************/

// Must be first for DEBUG_BOOL case
#include "ogr_gmlas.h"

CPL_CVSID("$Id$")
Expand Down
1 change: 0 additions & 1 deletion ogr/ogrsf_frmts/gmlas/ogrgmlasxsdcache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
* DEALINGS IN THE SOFTWARE.
****************************************************************************/

// Must be first for DEBUG_BOOL case
#include "ogr_gmlas.h"

#include "cpl_sha256.h"
Expand Down
Loading

0 comments on commit 2004e5a

Please sign in to comment.