From d89eea7cd899e6a22aec2bd6fa1a3ff7a02b97df Mon Sep 17 00:00:00 2001 From: Vaxry Date: Sat, 20 Apr 2024 03:31:26 +0100 Subject: [PATCH] enum: use iface name as well if available --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 0b30813..728a59e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -143,7 +143,7 @@ void parseXML(pugi::xml_document& doc) { for (auto& en : iface.children("enum")) { SEnum enum_; enum_.nameOriginal = en.attribute("name").as_string(); - enum_.name = camelize(PROTO_DATA.name + "_" + enum_.nameOriginal); + enum_.name = camelize(ifc.name + "_" + enum_.nameOriginal); for (auto& entry : en.children("entry")) { auto VALUENAME = enum_.nameOriginal + "_" + entry.attribute("name").as_string(); std::transform(VALUENAME.begin(), VALUENAME.end(), VALUENAME.begin(), ::toupper);