summaryrefslogtreecommitdiff
path: root/indra/llkdu
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2016-07-14 10:26:57 -0400
committerNat Goodspeed <nat@lindenlab.com>2016-07-14 10:26:57 -0400
commitd7c904632b9dac112228092952f993569477366c (patch)
tree0effed347ec114bfb3369770a611b776f82c6cce /indra/llkdu
parent2f003fd5a99f9b9f42b74a70d3a53e818b9bcee4 (diff)
MAINT-5011: On advice from NickyD, say KDUError not KduError.
Also place KDUError into anonymous namespace to emphasize that it's entirely local to this .cpp file.
Diffstat (limited to 'indra/llkdu')
-rw-r--r--indra/llkdu/llimagej2ckdu.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/indra/llkdu/llimagej2ckdu.cpp b/indra/llkdu/llimagej2ckdu.cpp
index 50c2e03cd4..2a5b24fbc1 100644
--- a/indra/llkdu/llimagej2ckdu.cpp
+++ b/indra/llkdu/llimagej2ckdu.cpp
@@ -36,10 +36,12 @@
#include <stdexcept>
-struct KduError: public std::runtime_error
+namespace {
+struct KDUError: public std::runtime_error
{
- KduError(const std::string& msg): std::runtime_error(msg) {}
+ KDUError(const std::string& msg): std::runtime_error(msg) {}
};
+} // anonymous namespace
class kdc_flow_control {
@@ -178,7 +180,7 @@ void LLKDUMessageError::flush(bool end_of_message)
{
if (end_of_message)
{
- throw KduError("LLKDUMessageError::flush()");
+ throw KDUError("LLKDUMessageError::flush()");
}
}
@@ -422,7 +424,7 @@ BOOL LLImageJ2CKDU::initDecode(LLImageJ2C &base, LLImageRaw &raw_image, F32 deco
mTPosp->x = 0;
}
}
- catch (const KduError& msg)
+ catch (const KDUError& msg)
{
base.setLastError(msg.what());
return FALSE;
@@ -512,7 +514,7 @@ BOOL LLImageJ2CKDU::decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 deco
return FALSE;
}
}
- catch (const KduError& msg)
+ catch (const KDUError& msg)
{
base.setLastError(msg.what());
base.decodeFailed();
@@ -705,7 +707,7 @@ BOOL LLImageJ2CKDU::encodeImpl(LLImageJ2C &base, const LLImageRaw &raw_image, co
base.updateData(); // set width, height
delete[] output_buffer;
}
- catch(const KduError& msg)
+ catch(const KDUError& msg)
{
base.setLastError(msg.what());
return FALSE;
@@ -729,7 +731,7 @@ BOOL LLImageJ2CKDU::getMetadata(LLImageJ2C &base)
setupCodeStream(base, FALSE, MODE_FAST);
return TRUE;
}
- catch (const KduError& msg)
+ catch (const KDUError& msg)
{
base.setLastError(msg.what());
return FALSE;