Editor code: tidy up BOOLs,NULLs and overrides pt4.
A few 'typedefs' replaced by 'using's This shouldn't have any functional changes at all, just c++17 modernization It's a part 4 of a split #2847 Signed-off-by: Nemerle <nemerle5+git@gmail.com>
This commit is contained in:
@@ -142,7 +142,7 @@ bool CImageTIF::Load(const QString& fileName, CImageEx& outImage)
|
||||
uint32 dwWidth, dwHeight;
|
||||
size_t npixels;
|
||||
uint32* raster;
|
||||
char* dccfilename = NULL;
|
||||
char* dccfilename = nullptr;
|
||||
|
||||
TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &dwWidth);
|
||||
TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &dwHeight);
|
||||
@@ -232,7 +232,7 @@ bool CImageTIF::Load(const QString& fileName, CFloatImage& outImage)
|
||||
{
|
||||
uint32 width = 0, height = 0;
|
||||
uint16 spp = 0, bpp = 0, format = 0;
|
||||
char* dccfilename = NULL;
|
||||
char* dccfilename = nullptr;
|
||||
|
||||
TIFFGetField(tif, TIFFTAG_IMAGEDESCRIPTION, &dccfilename);
|
||||
|
||||
@@ -252,11 +252,11 @@ bool CImageTIF::Load(const QString& fileName, CFloatImage& outImage)
|
||||
|
||||
// Check to see if it's a GeoTIFF, and if so, whether or not it has the ZScale parameter.
|
||||
uint32 tagCount = 0;
|
||||
double *pixelScales = NULL;
|
||||
double *pixelScales = nullptr;
|
||||
if (TIFFGetField(tif, GEOTIFF_MODELPIXELSCALE_TAG, &tagCount, &pixelScales) == 1)
|
||||
{
|
||||
// if there's an xyz scale, and the Z scale isn't 0, let's use it.
|
||||
if ((tagCount == 3) && (pixelScales != NULL) && (pixelScales[2] != 0.0f))
|
||||
if ((tagCount == 3) && (pixelScales != nullptr) && (pixelScales[2] != 0.0f))
|
||||
{
|
||||
pixelValueScale = static_cast<float>(pixelScales[2]);
|
||||
}
|
||||
@@ -455,7 +455,7 @@ const char* CImageTIF::GetPreset(const QString& fileName)
|
||||
if (!file.Open(fileName.toUtf8().data(), "rb"))
|
||||
{
|
||||
CLogFile::FormatLine("File not found %s", fileName.toUtf8().data());
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
MemImage memImage;
|
||||
@@ -473,7 +473,7 @@ const char* CImageTIF::GetPreset(const QString& fileName)
|
||||
libtiffDummyCloseProc, libtiffDummySizeProc, libtiffDummyMapFileProc, libtiffDummyUnmapFileProc);
|
||||
|
||||
string strReturn;
|
||||
char* preset = NULL;
|
||||
char* preset = nullptr;
|
||||
int size;
|
||||
if (tif)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user