summaryrefslogtreecommitdiff
path: root/src/cppunit/TestRegistry.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/cppunit/TestRegistry.cpp')
-rw-r--r--src/cppunit/TestRegistry.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/cppunit/TestRegistry.cpp b/src/cppunit/TestRegistry.cpp
index f4eaf74..cb96eb0 100644
--- a/src/cppunit/TestRegistry.cpp
+++ b/src/cppunit/TestRegistry.cpp
@@ -1,18 +1,18 @@
+#if _MSC_VER > 1000 // VC++
+#pragma once
+#pragma warning( disable : 4786 ) // disable warning debug symbol > 255...
+#endif // _MSC_VER > 1000
+
#include "cppunit/TestRegistry.h"
#include "cppunit/Test.h"
namespace CppUnit {
-TestRegistry*
-TestRegistry::s_registry = NULL;
-
TestRegistry&
TestRegistry::getRegistry ()
{
- if (NULL == s_registry) {
- s_registry = new TestRegistry();
- }
- return *s_registry;
+ static TestRegistry registry; // instantiated on first call of getRegistry().
+ return registry;
}
void