[Liblas-commits] r1074 - in trunk/src: . detail
liblas-commits at liblas.org
liblas-commits at liblas.org
Wed Feb 25 18:57:43 EST 2009
Author: mloskot
Date: Wed Feb 25 18:57:42 2009
New Revision: 1074
URL: http://liblas.org/changeset/1074
Log:
Use Zero as nullptr value instead of 'almost-deprecated' NULL macro.
Modified:
trunk/src/detail/reader.cpp
trunk/src/detail/writer.cpp
trunk/src/lassrs.cpp
Modified: trunk/src/detail/reader.cpp
==============================================================================
--- trunk/src/detail/reader.cpp (original)
+++ trunk/src/detail/reader.cpp Wed Feb 25 18:57:42 2009
@@ -162,8 +162,8 @@
{
m_out_srs = srs;
#ifdef HAVE_GDAL
- OGRSpatialReferenceH in_ref = OSRNewSpatialReference(NULL);
- OGRSpatialReferenceH out_ref = OSRNewSpatialReference(NULL);
+ OGRSpatialReferenceH in_ref = OSRNewSpatialReference(0);
+ OGRSpatialReferenceH out_ref = OSRNewSpatialReference(0);
const char* in_wkt = m_in_srs.GetWKT().c_str();
if (OSRImportFromWkt(in_ref, (char**) &in_wkt) != OGRERR_NONE)
Modified: trunk/src/detail/writer.cpp
==============================================================================
--- trunk/src/detail/writer.cpp (original)
+++ trunk/src/detail/writer.cpp Wed Feb 25 18:57:42 2009
@@ -118,8 +118,8 @@
{
m_out_srs = srs;
#ifdef HAVE_GDAL
- OGRSpatialReferenceH in_ref = OSRNewSpatialReference(NULL);
- OGRSpatialReferenceH out_ref = OSRNewSpatialReference(NULL);
+ OGRSpatialReferenceH in_ref = OSRNewSpatialReference(0);
+ OGRSpatialReferenceH out_ref = OSRNewSpatialReference(0);
const char* in_wkt = m_in_srs.GetWKT().c_str();
if (OSRImportFromWkt(in_ref, (char**) &in_wkt) != OGRERR_NONE)
Modified: trunk/src/lassrs.cpp
==============================================================================
--- trunk/src/lassrs.cpp (original)
+++ trunk/src/lassrs.cpp Wed Feb 25 18:57:42 2009
@@ -47,8 +47,8 @@
{
LASSRS::LASSRS() :
- m_gtiff(NULL),
- m_tiff(NULL)
+ m_gtiff(0),
+ m_tiff(0)
{
}
@@ -56,8 +56,8 @@
{
if (&rhs != this)
{
- m_tiff = NULL;
- m_gtiff = NULL;
+ m_tiff = 0;
+ m_gtiff = 0;
SetVLRs(rhs.GetVLRs());
GetGTIF();
}
@@ -70,28 +70,28 @@
if (m_gtiff)
{
GTIFFree(m_gtiff);
- m_gtiff = NULL;
+ m_gtiff = 0;
}
if (m_tiff)
{
ST_Destroy(m_tiff);
- m_tiff = NULL;
+ m_tiff = 0;
}
#endif
}
LASSRS::LASSRS(LASSRS const& other)
{
- m_tiff = NULL;
- m_gtiff = NULL;
+ m_tiff = 0;
+ m_gtiff = 0;
SetVLRs(other.GetVLRs());
GetGTIF();
}
LASSRS::LASSRS(std::vector<LASVLR> const& vlrs)
{
- m_tiff = NULL;
- m_gtiff = NULL;
+ m_tiff = 0;
+ m_gtiff = 0;
SetVLRs(vlrs);
GetGTIF();
}
@@ -178,12 +178,12 @@
#ifdef HAVE_LIBGEOTIFF
int ret = 0;
- short* kdata = NULL;
+ short* kdata = 0;
short kvalue = 0;
- double* ddata = NULL;
+ double* ddata = 0;
double dvalue = 0;
- uint8_t* adata = NULL;
- uint8_t avalue = NULL;
+ uint8_t* adata = 0;
+ uint8_t avalue = 0;
int dtype = 0;
int dcount = 0;
int ktype = 0;
@@ -321,13 +321,13 @@
if (m_tiff)
{
ST_Destroy(m_tiff);
- m_tiff = NULL;
+ m_tiff = 0;
}
if (m_gtiff)
{
GTIFFree(m_gtiff);
- m_gtiff = NULL;
+ m_gtiff = 0;
}
m_tiff = ST_Create();
@@ -373,7 +373,7 @@
return std::string();
#else
GTIFDefn sGTIFDefn;
- char* pszWKT = NULL;
+ char* pszWKT = 0;
if (!m_gtiff)
{
return std::string();
More information about the Liblas-commits
mailing list