From 117e6891b02a9487488ead012fc6216a40316c44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Fri, 1 Jan 2021 19:08:49 +0100 Subject: Reduce code size by avoiding static inline member variables Static inline member variables require the compiler to emit a static runtime constructor in all translation units that can see the variables in question. This normally wouldn't be a problem, but it gets expensive really quickly when you have ~3000 classes and ~3000 duplicate static constructors. This drops the ELF size from ~270MB to ~220MB and probably speeds up builds a little bit. --- src/KingSystem/ActorSystem/actAiQueries.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/KingSystem/ActorSystem/actAiQueries.cpp') diff --git a/src/KingSystem/ActorSystem/actAiQueries.cpp b/src/KingSystem/ActorSystem/actAiQueries.cpp index 5d900bcc..ac5e03a6 100644 --- a/src/KingSystem/ActorSystem/actAiQueries.cpp +++ b/src/KingSystem/ActorSystem/actAiQueries.cpp @@ -140,4 +140,6 @@ void Queries::setFactories(int count, QueryFactory* factories) { sFactories.setBuffer(count, factories); } +sead::Buffer Queries::sFactories; + } // namespace ksys::act::ai -- cgit v1.2.3