From 8e2d0fda7a41f314571707d800f5a3f0422e32af Mon Sep 17 00:00:00 2001 From: coco875 <59367621+coco875@users.noreply.github.com> Date: Thu, 20 Nov 2025 17:17:37 +0100 Subject: always declare Companion* Companion::Instance --- src/Companion.cpp | 2 ++ src/Companion.h | 2 -- src/main.cpp | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/Companion.cpp b/src/Companion.cpp index c4fb5a1..34aba98 100644 --- a/src/Companion.cpp +++ b/src/Companion.cpp @@ -126,6 +126,8 @@ static std::string GetTypeNode(YAML::Node& node) { return type; } +Companion* Companion::Instance; + void Companion::Init(const ExportType type) { spdlog::set_level(spdlog::level::debug); diff --git a/src/Companion.h b/src/Companion.h index ca63221..2b6fc09 100644 --- a/src/Companion.h +++ b/src/Companion.h @@ -110,9 +110,7 @@ struct ParseResultData { class Companion { public: -#if defined(STANDALONE) && !defined(__EMSCRIPTEN__) static Companion* Instance; -#endif explicit Companion(std::filesystem::path rom, const ArchiveType otr, const bool debug, const bool modding = false, const std::string& srcDir = "", const std::string& destPath = "") : gCartridge(nullptr), diff --git a/src/main.cpp b/src/main.cpp index b5ea9fc..c5de09b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -4,8 +4,6 @@ #if defined(STANDALONE) && !defined(__EMSCRIPTEN__) -Companion* Companion::Instance; - int main(int argc, char *argv[]) { CLI::App app{"Torch - [T]orch is [O]ur [R]esource [C]onversion [H]elper\n\ * It extracts from a baserom and generates code or an otr.\n\ -- cgit v1.2.3