Browse Source

Util: Revert allow setting instance pointer manually

This is unnecessary as the allocation + placement new works.
master
Riyyi 2 years ago
parent
commit
703be90792
  1. 2
      src/ruc/format/formatter.h
  2. 7
      src/ruc/singleton.h

2
src/ruc/format/formatter.h

@ -331,6 +331,8 @@ struct Formatter<Specifier> : Formatter<std::nullptr_t> {
} // namespace ruc::format
using ruc::format::Formatter;
#if 0
TODO:

7
src/ruc/singleton.h

@ -46,13 +46,6 @@ public:
protected:
Singleton() {}
// Hack: in certain situations the instance needs to be set early
static void set(T* instance)
{
VERIFY(!s_instance, "singleton already exists");
s_instance = instance;
}
// Constructor token
struct s {};

Loading…
Cancel
Save