mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-22 06:03:45 +00:00
[traffxml] Adhere to naming convention for member names
Signed-off-by: mvglasow <michael -at- vonglasow.com>
This commit is contained in:
@@ -181,8 +181,8 @@ std::string DebugPrint(TraffEvent event)
|
|||||||
{
|
{
|
||||||
std::ostringstream os;
|
std::ostringstream os;
|
||||||
os << "TraffEvent { ";
|
os << "TraffEvent { ";
|
||||||
os << "class: " << DebugPrint(event.m_Class) << ", ";
|
os << "class: " << DebugPrint(event.m_class) << ", ";
|
||||||
os << "type: " << DebugPrint(event.m_Type) << ", ";
|
os << "type: " << DebugPrint(event.m_type) << ", ";
|
||||||
os << "length: " << (event.m_length ? std::to_string(event.m_length.value()) : "nullopt") << ", ";
|
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") << ", ";
|
os << "probability: " << (event.m_probability ? std::to_string(event.m_probability.value()) : "nullopt") << ", ";
|
||||||
// TODO optional quantifier
|
// TODO optional quantifier
|
||||||
|
|||||||
@@ -162,8 +162,8 @@ struct TraffLocation
|
|||||||
|
|
||||||
struct TraffEvent
|
struct TraffEvent
|
||||||
{
|
{
|
||||||
EventClass m_Class = EventClass::Invalid;
|
EventClass m_class = EventClass::Invalid;
|
||||||
EventType m_Type = EventType::Invalid;
|
EventType m_type = EventType::Invalid;
|
||||||
std::optional<uint8_t> m_length;
|
std::optional<uint8_t> m_length;
|
||||||
std::optional<uint8_t> m_probability;
|
std::optional<uint8_t> m_probability;
|
||||||
// TODO optional quantifier
|
// TODO optional quantifier
|
||||||
|
|||||||
@@ -503,7 +503,7 @@ bool EventFromXml(pugi::xml_node node, TraffEvent & event)
|
|||||||
LOG(LWARNING, ("No event class specified, ignoring"));
|
LOG(LWARNING, ("No event class specified, ignoring"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!EnumFromXml(node.attribute("class"), event.m_Class, kEventClassMap))
|
if (!EnumFromXml(node.attribute("class"), event.m_class, kEventClassMap))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
std::string eventType;
|
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)"));
|
LOG(LWARNING, ("Event type", eventType, "does not match event class", eventClass, "(ignoring)"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!EnumFromXml(node.attribute("type"), event.m_Type, kEventTypeMap))
|
if (!EnumFromXml(node.attribute("type"), event.m_type, kEventTypeMap))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
event.m_length = OptionalIntegerFromXml(node.attribute("length"));
|
event.m_length = OptionalIntegerFromXml(node.attribute("length"));
|
||||||
|
|||||||
Reference in New Issue
Block a user