diff options
author | Oz Linden <oz@lindenlab.com> | 2016-10-18 15:38:33 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2016-10-18 15:38:33 -0400 |
commit | 8e30a2f06dd1ce407fcb2399823efed883b317d2 (patch) | |
tree | e5b22fb9fd2b5e99cf195d00338da57ecdade0d4 /indra/llimage/llimagedxt.cpp | |
parent | 7df153e352ce50ded382df020cc3696b8c1b9325 (diff) | |
parent | 086c1342152895da28d2e0130d09432152604ca8 (diff) |
merge changes for 4.1.1-release
Diffstat (limited to 'indra/llimage/llimagedxt.cpp')
-rw-r--r-- | indra/llimage/llimagedxt.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/indra/llimage/llimagedxt.cpp b/indra/llimage/llimagedxt.cpp index 04e0e752eb..0ec83415a0 100644 --- a/indra/llimage/llimagedxt.cpp +++ b/indra/llimage/llimagedxt.cpp @@ -172,7 +172,7 @@ LLImageDXT::~LLImageDXT() } // virtual -BOOL LLImageDXT::updateData() +bool LLImageDXT::updateData() { resetLastError(); @@ -182,7 +182,7 @@ BOOL LLImageDXT::updateData() if (!data || !data_size) { setLastError("LLImageDXT uninitialized"); - return FALSE; + return false; } S32 width, height, miplevelmax; @@ -216,7 +216,7 @@ BOOL LLImageDXT::updateData() discard = llmin(discard, miplevelmax); setDiscardLevel(discard); - return TRUE; + return true; } // discard: 0 = largest (last) mip @@ -257,7 +257,7 @@ void LLImageDXT::setFormat() } // virtual -BOOL LLImageDXT::decode(LLImageRaw* raw_image, F32 time) +bool LLImageDXT::decode(LLImageRaw* raw_image, F32 time) { // *TODO: Test! This has been tweaked since its intial inception, // but we don't use it any more! @@ -266,7 +266,7 @@ BOOL LLImageDXT::decode(LLImageRaw* raw_image, F32 time) if (mFileFormat >= FORMAT_DXT1 && mFileFormat <= FORMAT_DXR5) { LL_WARNS() << "Attempt to decode compressed LLImageDXT to Raw (unsupported)" << LL_ENDL; - return FALSE; + return false; } S32 width = getWidth(), height = getHeight(); @@ -286,16 +286,16 @@ BOOL LLImageDXT::decode(LLImageRaw* raw_image, F32 time) if ((!getData()) || (data + image_size > getData() + getDataSize())) { setLastError("LLImageDXT trying to decode an image with not enough data!"); - return FALSE; + return false; } raw_image->resize(width, height, ncomponents); memcpy(raw_image->getData(), data, image_size); /* Flawfinder: ignore */ - return TRUE; + return true; } -BOOL LLImageDXT::getMipData(LLPointer<LLImageRaw>& raw, S32 discard) +bool LLImageDXT::getMipData(LLPointer<LLImageRaw>& raw, S32 discard) { if (discard < 0) { @@ -310,10 +310,10 @@ BOOL LLImageDXT::getMipData(LLPointer<LLImageRaw>& raw, S32 discard) S32 height = 0; calcDiscardWidthHeight(discard, mFileFormat, width, height); raw = new LLImageRaw(data, width, height, getComponents()); - return TRUE; + return true; } -BOOL LLImageDXT::encodeDXT(const LLImageRaw* raw_image, F32 time, bool explicit_mips) +bool LLImageDXT::encodeDXT(const LLImageRaw* raw_image, F32 time, bool explicit_mips) { llassert_always(raw_image); @@ -395,11 +395,11 @@ BOOL LLImageDXT::encodeDXT(const LLImageRaw* raw_image, F32 time, bool explicit_ prev_mipdata = mipdata; } - return TRUE; + return true; } // virtual -BOOL LLImageDXT::encode(const LLImageRaw* raw_image, F32 time) +bool LLImageDXT::encode(const LLImageRaw* raw_image, F32 time) { return encodeDXT(raw_image, time, false); } |