From d7e411d8fb355b7e4198c3521144e3fee2b8e62c Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Fri, 23 Feb 2024 09:56:16 -0500
Subject: Ditch DebugExit: we already have Debug (in debug.h)

---
 indra/llcommon/lua_function.cpp | 10 +---------
 indra/llcommon/lua_function.h   | 12 ------------
 2 files changed, 1 insertion(+), 21 deletions(-)

(limited to 'indra')

diff --git a/indra/llcommon/lua_function.cpp b/indra/llcommon/lua_function.cpp
index 13210fe5a6..906a3f379c 100644
--- a/indra/llcommon/lua_function.cpp
+++ b/indra/llcommon/lua_function.cpp
@@ -16,6 +16,7 @@
 // STL headers
 // std headers
 #include <algorithm>
+#include <iomanip>                  // std::quoted
 #include <map>
 #include <memory>                   // std::unique_ptr
 // external library headers
@@ -92,7 +93,6 @@ LLSD lua_tollsd(lua_State* L, int index)
 {
     LL_DEBUGS("Lua") << "lua_tollsd(" << index << ") of " << lua_gettop(L) << " stack entries: "
                      << lua_what(L, index) << LL_ENDL;
-    DebugExit log_exit("lua_tollsd()");
     switch (lua_type(L, index))
     {
     case LUA_TNONE:
@@ -785,11 +785,3 @@ std::ostream& operator<<(std::ostream& out, const lua_stack& self)
     out << ']';
     return out;
 }
-
-/*****************************************************************************
-*   DebugExit
-*****************************************************************************/
-DebugExit::~DebugExit()
-{
-    LL_DEBUGS("Lua") << "exit " << mName << LL_ENDL;
-}
diff --git a/indra/llcommon/lua_function.h b/indra/llcommon/lua_function.h
index 7973a769be..eccc92ec09 100644
--- a/indra/llcommon/lua_function.h
+++ b/indra/llcommon/lua_function.h
@@ -213,16 +213,4 @@ private:
     lua_State* L;
 };
 
-// log exit from any block declaring an instance of DebugExit, regardless of
-// how control leaves that block
-struct DebugExit
-{
-    DebugExit(const std::string& name): mName(name) {}
-    DebugExit(const DebugExit&) = delete;
-    DebugExit& operator=(const DebugExit&) = delete;
-    ~DebugExit();
-
-    std::string mName;
-};
-
 #endif /* ! defined(LL_LUA_FUNCTION_H) */
-- 
cgit v1.2.3