From ef1ec79ade41454d2ba522ca4aa69de6d1eba0d0 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Sat, 26 Oct 2019 17:30:42 -0400
Subject: [PATCH] Remove debug code in release builds

---
 indra/newview/llvovolume.cpp | 10 ++++++++--
 indra/newview/pipeline.cpp   |  3 ++-
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 38a8fb7c07..ae04e5ebde 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -1519,6 +1519,7 @@ BOOL LLVOVolume::updateLOD()
 
 	if (lod_changed)
 	{
+#if LL_DEBUG
 		static bool debug_log = debugLoggingEnabled("AnimatedObjectsLinkset");
         if (debug_log)
         {
@@ -1529,7 +1530,7 @@ BOOL LLVOVolume::updateLOD()
                 LL_DEBUGS("AnimatedObjectsLinkset") << vobj_name << " updateLOD to " << getLOD() << ", tris " << est_tris << LL_ENDL; 
             }
         }
-
+#endif
 		gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME, FALSE);
 		mLODChanged = TRUE;
 	}
@@ -4430,6 +4431,7 @@ const LLMatrix4& LLVOVolume::getWorldMatrix(LLXformMatrix* xform) const
 
 void LLVOVolume::markForUpdate(BOOL priority)
 { 
+#if LL_DEBUG
 	static bool debug_log = debugLoggingEnabled("AnimatedObjectsLinkset");
 	if (debug_log)
     {
@@ -4440,7 +4442,7 @@ void LLVOVolume::markForUpdate(BOOL priority)
             LL_DEBUGS("AnimatedObjectsLinkset") << vobj_name << " markForUpdate, tris " << est_tris << LL_ENDL; 
         }
     }
-
+#endif
     LLViewerObject::markForUpdate(priority); 
     mVolumeChanged = TRUE; 
 }
@@ -5513,6 +5515,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
 
 			vobj->updateControlAvatar();
 
+#if LL_DEBUG
 			static bool debug_log = debugLoggingEnabled("AnimatedObjectsLinkset");
 			if (debug_log)
 			{
@@ -5536,6 +5539,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
                                                 << " frame " << LLFrameTimer::getFrameCount()
                                                 << LL_ENDL;
 			}
+#endif
 
 
 			vobj->updateTextureVirtualSize(true);
@@ -6289,6 +6293,7 @@ void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group)
 			if (drawablep && !drawablep->isDead() && drawablep->isState(LLDrawable::REBUILD_ALL) && !drawablep->isState(LLDrawable::RIGGED) )
 			{
 				LLVOVolume* vobj = drawablep->getVOVolume();
+#if LL_DEBUG
 				static bool debug_log = debugLoggingEnabled("AnimatedObjectsLinkset");
 				if (debug_log)
                 {
@@ -6299,6 +6304,7 @@ void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group)
                         LL_DEBUGS("AnimatedObjectsLinkset") << vobj_name << " rebuildMesh, tris " << est_tris << LL_ENDL; 
                     }
                 }
+#endif
 				if (vobj->isNoLOD()) continue;
 
 				vobj->preRebuild();
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index d2ba29caef..62b163acd0 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -3238,6 +3238,7 @@ void LLPipeline::markRebuild(LLDrawable *drawablep, LLDrawable::EDrawableFlags f
 {
 	if (drawablep && !drawablep->isDead() && assertInitialized())
 	{
+#if LL_DEBUG
 		static bool debug_log = debugLoggingEnabled("AnimatedObjectsLinkset");
         if (debug_log)
         {
@@ -3250,7 +3251,7 @@ void LLPipeline::markRebuild(LLDrawable *drawablep, LLDrawable::EDrawableFlags f
                                                     << " priority " << (S32) priority << " flag " << std::hex << flag << LL_ENDL; 
             }
         }
-    
+#endif
 		if (!drawablep->isState(LLDrawable::BUILT))
 		{
 			priority = true;
-- 
GitLab