diff options
author | Lars Næsbye Christensen <lars@naesbye.dk> | 2024-02-09 01:56:54 +0100 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-02-12 23:17:22 +0200 |
commit | 981470e0a1f4d3157d6528b3966922d825e77fce (patch) | |
tree | 076f1db900504c86e591566be5baffa8771939e0 /indra/llimage/llpngwrapper.cpp | |
parent | 79ceefe56b5fabdbcc1476d1d5b8253aa405ed21 (diff) |
llimage: BOOL (int) to real bool
Diffstat (limited to 'indra/llimage/llpngwrapper.cpp')
-rw-r--r-- | indra/llimage/llpngwrapper.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/indra/llimage/llpngwrapper.cpp b/indra/llimage/llpngwrapper.cpp index 27e23b577b..baf1330011 100644 --- a/indra/llimage/llpngwrapper.cpp +++ b/indra/llimage/llpngwrapper.cpp @@ -70,7 +70,7 @@ LLPngWrapper::~LLPngWrapper() } // Checks the src for a valid PNG header -BOOL LLPngWrapper::isValidPng(U8* src) +bool LLPngWrapper::isValidPng(U8* src) { const int PNG_BYTES_TO_CHECK = 8; @@ -78,10 +78,10 @@ BOOL LLPngWrapper::isValidPng(U8* src) if (sig != 0) { mErrorMessage = "Invalid or corrupt PNG file"; - return FALSE; + return false; } - return TRUE; + return true; } // Called by the libpng library when a fatal encoding or decoding error @@ -134,7 +134,7 @@ void LLPngWrapper::writeFlush(png_structp png_ptr) // The scanline also begins at the bottom of // the image (per SecondLife conventions) instead of at the top, so we // must assign row-pointers in "reverse" order. -BOOL LLPngWrapper::readPng(U8* src, S32 dataSize, LLImageRaw* rawImage, ImageInfo *infop) +bool LLPngWrapper::readPng(U8* src, S32 dataSize, LLImageRaw* rawImage, ImageInfo *infop) { try { @@ -210,18 +210,18 @@ BOOL LLPngWrapper::readPng(U8* src, S32 dataSize, LLImageRaw* rawImage, ImageInf { mErrorMessage = msg.what(); releaseResources(); - return (FALSE); + return (false); } catch (std::bad_alloc&) { mErrorMessage = "LLPngWrapper"; releaseResources(); - return (FALSE); + return (false); } // Clean up and return releaseResources(); - return (TRUE); + return (true); } // Do transformations to normalize the input to 8-bpp RGBA @@ -283,7 +283,7 @@ void LLPngWrapper::updateMetaData() // Method to write raw image into PNG at dest. The raw scanline begins // at the bottom of the image per SecondLife conventions. -BOOL LLPngWrapper::writePng(const LLImageRaw* rawImage, U8* dest, size_t destSize) +bool LLPngWrapper::writePng(const LLImageRaw* rawImage, U8* dest, size_t destSize) { try { @@ -364,11 +364,11 @@ BOOL LLPngWrapper::writePng(const LLImageRaw* rawImage, U8* dest, size_t destSiz { mErrorMessage = msg.what(); releaseResources(); - return (FALSE); + return (false); } releaseResources(); - return TRUE; + return true; } // Cleanup various internal structures |