headers: make enum names more verbose to avoid conflicts

This commit is contained in:
Vaxry 2024-04-21 20:39:44 +01:00
parent 9e13e09152
commit 6c4c47329f

View file

@ -145,7 +145,7 @@ void parseXML(pugi::xml_document& doc) {
enum_.nameOriginal = en.attribute("name").as_string(); enum_.nameOriginal = en.attribute("name").as_string();
enum_.name = camelize(ifc.name + "_" + enum_.nameOriginal); enum_.name = camelize(ifc.name + "_" + enum_.nameOriginal);
for (auto& entry : en.children("entry")) { for (auto& entry : en.children("entry")) {
auto VALUENAME = enum_.nameOriginal + "_" + entry.attribute("name").as_string(); auto VALUENAME = ifc.name + "_" + enum_.nameOriginal + "_" + entry.attribute("name").as_string();
std::transform(VALUENAME.begin(), VALUENAME.end(), VALUENAME.begin(), ::toupper); std::transform(VALUENAME.begin(), VALUENAME.end(), VALUENAME.begin(), ::toupper);
enum_.values.emplace_back(std::make_pair<>(VALUENAME, entry.attribute("value").as_int())); enum_.values.emplace_back(std::make_pair<>(VALUENAME, entry.attribute("value").as_int()));
} }