From c7174843c35e0f1f8f2d6e2d4cdbb386f2a82361 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sun, 8 Jan 2023 14:55:14 +0200 Subject: [PATCH] Prefix C++ types with namespaces in the setup generator --- tools/setupgen/setupgen.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/setupgen/setupgen.cpp b/tools/setupgen/setupgen.cpp index 571396f..efb93fb 100644 --- a/tools/setupgen/setupgen.cpp +++ b/tools/setupgen/setupgen.cpp @@ -208,6 +208,7 @@ void SetupGen::Loader::enum_def(const DataFile::Symbol &n) Enum en(n.name); load_sub(en); Type &type = obj.add_type(n.name, Type::ENUM); + type.set_cpp_type(join(mod.name_space, "::", type.get_cpp_type())); type.set_enum(*mod.enums.emplace_back(make_unique(move(en)))); } @@ -235,5 +236,6 @@ void SetupGen::Loader::struct_def(Struct::Kind kind, const DataFile::Symbol &n) Struct sct(n.name+"Setup", kind); load_sub(sct, obj); Type &type = obj.add_type(n.name, Type::STRUCT); + type.set_cpp_type(join(mod.name_space, "::", type.get_cpp_type())); type.set_struct(*mod.structs.emplace_back(make_unique(move(sct)))); } -- 2.45.2