[traffxml] Adhere to naming convention for member names

Signed-off-by: mvglasow <michael -at- vonglasow.com>
This commit is contained in:
mvglasow
2025-05-04 16:49:40 +03:00
parent f0f847b214
commit 7be0b8a256
3 changed files with 6 additions and 6 deletions

View File

@@ -181,8 +181,8 @@ std::string DebugPrint(TraffEvent event)
{
std::ostringstream os;
os << "TraffEvent { ";
os << "class: " << DebugPrint(event.m_Class) << ", ";
os << "type: " << DebugPrint(event.m_Type) << ", ";
os << "class: " << DebugPrint(event.m_class) << ", ";
os << "type: " << DebugPrint(event.m_type) << ", ";
os << "length: " << (event.m_length ? std::to_string(event.m_length.value()) : "nullopt") << ", ";
os << "probability: " << (event.m_probability ? std::to_string(event.m_probability.value()) : "nullopt") << ", ";
// TODO optional quantifier

View File

@@ -162,8 +162,8 @@ struct TraffLocation
struct TraffEvent
{
EventClass m_Class = EventClass::Invalid;
EventType m_Type = EventType::Invalid;
EventClass m_class = EventClass::Invalid;
EventType m_type = EventType::Invalid;
std::optional<uint8_t> m_length;
std::optional<uint8_t> m_probability;
// TODO optional quantifier

View File

@@ -503,7 +503,7 @@ bool EventFromXml(pugi::xml_node node, TraffEvent & event)
LOG(LWARNING, ("No event class specified, ignoring"));
return false;
}
if (!EnumFromXml(node.attribute("class"), event.m_Class, kEventClassMap))
if (!EnumFromXml(node.attribute("class"), event.m_class, kEventClassMap))
return false;
std::string eventType;
@@ -517,7 +517,7 @@ bool EventFromXml(pugi::xml_node node, TraffEvent & event)
LOG(LWARNING, ("Event type", eventType, "does not match event class", eventClass, "(ignoring)"));
return false;
}
if (!EnumFromXml(node.attribute("type"), event.m_Type, kEventTypeMap))
if (!EnumFromXml(node.attribute("type"), event.m_type, kEventTypeMap))
return false;
event.m_length = OptionalIntegerFromXml(node.attribute("length"));