summaryrefslogtreecommitdiffstats
path: root/src/demangle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/demangle.cpp')
-rw-r--r--src/demangle.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/demangle.cpp b/src/demangle.cpp
index 01ee4f2..ef5dec6 100644
--- a/src/demangle.cpp
+++ b/src/demangle.cpp
@@ -504,7 +504,9 @@ void unittest()
bool d_demangle(const char* name, char* demangled, int maxlen, bool plain)
{
+#ifdef _DEBUG
static bool once; if(!once) { once = true; unittest(); }
+#endif
Demangle d;
string r = d.demangle(name, plain);