summaryrefslogtreecommitdiff
path: root/indra/llprimitive/llprimtexturelist.cpp
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2023-07-19 13:04:12 +0800
committerErik Kundiman <erik@megapahit.org>2023-07-19 14:57:23 +0800
commit2c31cc45d4e41c42a8940bdefb79eae9d85d8fd7 (patch)
tree4a232678ec7ad5a7dfd0e3c21002a0c832241ac5 /indra/llprimitive/llprimtexturelist.cpp
parent0f9aee9e992c34dccdb012a554a013d94437ebc5 (diff)
Pass texture entry pointer instead to copyTexture
Otherwise on GCC the -Waddress & -Wno-nonnull-compare warnings would be treated as errors. It's a different term on Clang, which is undefined bool conversion. On Clang it's just a warning, but on AppleClang it's treated as an error. Rather than suppressing these warnings, I think it's better to just adjust the interface of copyTexture, since it isn't called that many times.
Diffstat (limited to 'indra/llprimitive/llprimtexturelist.cpp')
-rw-r--r--indra/llprimitive/llprimtexturelist.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/indra/llprimitive/llprimtexturelist.cpp b/indra/llprimitive/llprimtexturelist.cpp
index f4f08248b8..b50c541488 100644
--- a/indra/llprimitive/llprimtexturelist.cpp
+++ b/indra/llprimitive/llprimtexturelist.cpp
@@ -125,7 +125,7 @@ void LLPrimTextureList::take(LLPrimTextureList& other_list)
// virtual
// copies LLTextureEntry 'te'
// returns TEM_CHANGE_TEXTURE if successful, otherwise TEM_CHANGE_NONE
-S32 LLPrimTextureList::copyTexture(const U8 index, const LLTextureEntry& te)
+S32 LLPrimTextureList::copyTexture(const U8 index, const LLTextureEntry* te)
{
if (S32(index) >= mEntryList.size())
{
@@ -137,9 +137,9 @@ S32 LLPrimTextureList::copyTexture(const U8 index, const LLTextureEntry& te)
// we're changing an existing entry
llassert(mEntryList[index]);
delete (mEntryList[index]);
- if (&te)
+ if (te)
{
- mEntryList[index] = te.newCopy();
+ mEntryList[index] = te->newCopy();
}
else
{