From 46e2710178f07e814b1ab743eaa65c83df0f5b13 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Sat, 19 Jun 2021 18:17:21 -0400
Subject: [PATCH] Clean up assert in release

---
 indra/llcommon/llerror.h          | 6 +-----
 indra/llrender/llvertexbuffer.cpp | 2 +-
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/indra/llcommon/llerror.h b/indra/llcommon/llerror.h
index 5bb197fc787..5b77d50d12e 100644
--- a/indra/llcommon/llerror.h
+++ b/indra/llcommon/llerror.h
@@ -51,7 +51,7 @@ const int LL_ERR_NOERR = 0;
 #define SHOW_ASSERT
 #else // _DEBUG
 
-#ifdef LL_RELEASE_WITH_DEBUG_INFO
+#if defined(LL_RELEASE_WITH_DEBUG_INFO) || defined(RELEASE_SHOW_ASSERT)
 #define SHOW_ASSERT
 #endif // LL_RELEASE_WITH_DEBUG_INFO
 
@@ -67,10 +67,6 @@ const int LL_ERR_NOERR = 0;
 #define SHOW_INFO
 #endif
 
-#ifdef RELEASE_SHOW_ASSERT
-#define SHOW_ASSERT
-#endif
-
 #endif // !_DEBUG
 
 #define llassert_always_msg(func, msg) if (LL_UNLIKELY(!(func))) LL_ERRS() << "ASSERT (" << msg << ")" << LL_ENDL
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp
index 7e447c7b5ff..11c9d6ca399 100644
--- a/indra/llrender/llvertexbuffer.cpp
+++ b/indra/llrender/llvertexbuffer.cpp
@@ -121,7 +121,7 @@ bool LLVertexBuffer::sUseVAO = false;
 bool LLVertexBuffer::sPreferStreamDraw = false;
 LLVertexBuffer* LLVertexBuffer::sUtilityBuffer = nullptr;
 
-#if LL_DEBUG || LL_RELEASE_WITH_DEBUG_INFO
+#if LL_DEBUG || LL_RELEASE_WITH_DEBUG_INFO || defined(RELEASE_SHOW_ASSERT)
 static absl::flat_hash_set<U32> sActiveBufferNames;
 static absl::flat_hash_set<U32> sDeletedBufferNames;
 
-- 
GitLab