From 944c497090b09e30377a67d60049c641b5e10e55 Mon Sep 17 00:00:00 2001 From: Nicky Date: Sun, 24 Apr 2016 12:55:50 +0200 Subject: Code stylistics. (transplanted from 570ea799407270069974021eca3a5056d6908f58) --- indra/llmath/v4coloru.h | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'indra') diff --git a/indra/llmath/v4coloru.h b/indra/llmath/v4coloru.h index 31ae3e3c1a..704ce852d9 100644 --- a/indra/llmath/v4coloru.h +++ b/indra/llmath/v4coloru.h @@ -563,19 +563,9 @@ void LLColor4U::setVecScaleClamp(const LLColor3& color) inline U32 LLColor4U::asRGBA() const { - U32 nRet( 0 ); - // Little endian: values are swapped in memory. The original code access the array like a U32, so we need to swap here - nRet |= mV[ 3 ]; - nRet <<= 8; - nRet |= mV[ 2 ]; - nRet <<= 8; - nRet |= mV[ 1 ]; - nRet <<= 8; - nRet |= mV[ 0 ]; - - return nRet; + return (mV[3] << 24) | (mV[2] << 16) | (mV[1] << 8) | mV[0]; } inline void LLColor4U::fromRGBA( U32 aVal ) -- cgit v1.2.3