From 703be90792af0aedeea9a048ac756456cc14224a Mon Sep 17 00:00:00 2001 From: Riyyi Date: Sun, 25 Sep 2022 21:40:21 +0200 Subject: [PATCH] Util: Revert allow setting instance pointer manually This is unnecessary as the allocation + placement new works. --- src/ruc/format/formatter.h | 2 ++ src/ruc/singleton.h | 7 ------- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/ruc/format/formatter.h b/src/ruc/format/formatter.h index e479278..89562e6 100644 --- a/src/ruc/format/formatter.h +++ b/src/ruc/format/formatter.h @@ -331,6 +331,8 @@ struct Formatter : Formatter { } // namespace ruc::format +using ruc::format::Formatter; + #if 0 TODO: diff --git a/src/ruc/singleton.h b/src/ruc/singleton.h index 922880c..ee12728 100644 --- a/src/ruc/singleton.h +++ b/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 {};