From e8aa2dd71fff7a39f2b03039b23afa8bdf804fcb Mon Sep 17 00:00:00 2001 From: Nicky Date: Fri, 22 Apr 2016 14:58:25 +0200 Subject: x64: Do not use a union of LLColor4U. Especially having the two pointer in there will blow up the struct to at least 8 byte, which will break VBO packing as this class needs to be 4 byte in size. (transplanted from 847df86d6b5daa69dcfc428df18876a9c1e8bef6) --- indra/llimage/llimage.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/llimage') diff --git a/indra/llimage/llimage.cpp b/indra/llimage/llimage.cpp index f71607096c..a6cbcc131e 100644 --- a/indra/llimage/llimage.cpp +++ b/indra/llimage/llimage.cpp @@ -1218,9 +1218,10 @@ void LLImageRaw::fill( const LLColor4U& color ) if( 4 == getComponents() ) { U32* data = (U32*) getData(); + U32 rgbaColor = color.asRGBA(); for( S32 i = 0; i < pixels; i++ ) { - data[i] = color.mAll; + data[ i ] = rgbaColor; } } else -- cgit v1.2.3 From ae0b3149badf369eb2b1f10aba830eef8b4af9b4 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 23 Feb 2017 16:49:49 -0500 Subject: DRTVWR-418: Fix a round of compile errors surfaced by -std=c++11. These are mostly things that were in fact erroneous, but accepted by older compilers. This changeset has not yet been built with Visual Studio 2013 or Linux gcc, even with -std=c++11. This changeset has not been built *without* -std=c++11. It should be used in conjunction with a corresponding change to LL_BUILD_DARWIN_BASE_SWITCHES in viewer-build-variables/variables. This is a work in progress. We do not assert that this changeset completes the work needed to turn on -std=c++11, even on the Mac. --- indra/llimage/llimagetga.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llimage') diff --git a/indra/llimage/llimagetga.cpp b/indra/llimage/llimagetga.cpp index 5ad7658ec1..7c75aa1e2a 100644 --- a/indra/llimage/llimagetga.cpp +++ b/indra/llimage/llimagetga.cpp @@ -811,7 +811,7 @@ bool LLImageTGA::decodeTruecolorRle32( LLImageRaw* raw_image, bool &alpha_opaque } src += 4; - register U32 value = rgba; + U32 value = rgba; do { *dst_pixels = value; -- cgit v1.2.3