-
Notifications
You must be signed in to change notification settings - Fork 74
Open
Description
SHPLIB_NULLPTR is defined in a number of places. e.g. shpopen.c
#ifdef __cplusplus
#define STATIC_CAST(type,x) static_cast<type>(x)
#define SHPLIB_NULLPTR nullptr
#else
#define STATIC_CAST(type,x) ((type)(x))
#define SHPLIB_NULLPTR NULL
#endif
This doesn't buy much as there is not mechanism in shapelib to build as C++. If the internals are ever converted to C++, then most of the NULLs should be converted to nullptr. The idea of having it both ways just adds complexity. Currently:
grep SHPLIB_NULLPTR *.c | wc -l
245
grep NULL *.c | grep -v SHPLIB_NULLPTR | wc -l
92
@rouault added the cast macros and SHPLIB_NULLPTR in 8ba2778. However, looking at gdal/ogr/ogrsf_frmts/shape, it doesn't currently look like shapelib is being built as C++ in sGDAL
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels