enh: #3890: Get rid of SingletonHolder

This commit is contained in:
Günter Obiltschnig
2024-01-30 09:56:27 +01:00
parent 33638df51e
commit d5a5ebc2d7
23 changed files with 44 additions and 168 deletions

View File

@@ -15,7 +15,6 @@
#include "Poco/Prometheus/Registry.h"
#include "Poco/Prometheus/Collector.h"
#include "Poco/Exception.h"
#include "Poco/SingletonHolder.h"
using namespace std::string_literals;
@@ -90,15 +89,10 @@ void Registry::exportTo(Exporter& exporter) const
}
namespace
{
static SingletonHolder<Registry> sh;
}
Registry& Registry::defaultRegistry()
{
return *sh.get();
static Registry r;
return r;
}