[traffxml] Fix compiler warnings

Signed-off-by: mvglasow <michael -at- vonglasow.com>
This commit is contained in:
mvglasow
2025-08-16 19:59:28 +03:00
parent 57f55f1022
commit 6963637b1b
4 changed files with 10 additions and 2 deletions

View File

@@ -29,6 +29,8 @@
namespace traffxml
{
// Only needed for OpenlrTraffDecoder, see below
#if 0
// Number of worker threads for the OpenLR decoder
/*
* TODO how to determine the best number of worker threads?
@@ -37,6 +39,7 @@ namespace traffxml
* Otherwise there is little to be gained, as we decode messages one at a time.
*/
auto constexpr kNumDecoderThreads = 1;
#endif
// Timeout for the router in seconds, used by RoutingTraffDecoder
// TODO set to a sensible value

View File

@@ -41,6 +41,8 @@ public:
const CountryParentNameGetterFn & countryParentNameGetter,
std::map<std::string, traffxml::TraffMessage> & messageCache);
virtual ~TraffDecoder() {}
/**
* @brief Decodes a single message to its segments and their speed groups.
*

View File

@@ -826,8 +826,9 @@ bool SegmentFromXml(pugi::xml_node const & node,
std::map<traffic::TrafficInfo::RoadSegmentId, traffic::SpeedGroup> & coloring)
{
uint32_t fid;
uint16_t idx;
uint8_t dir;
// initialize to get rid of compiler warnings (which are false alerts)
uint16_t idx = 0;
uint8_t dir = 0;
if (IntegerFromXml(node.attribute("fid"), fid)
&& IntegerFromXml(node.attribute("idx"), idx)
&& IntegerFromXml(node.attribute("dir"), dir))

View File

@@ -26,6 +26,8 @@ class TraffSource;
class TraffSourceManager
{
public:
virtual ~TraffSourceManager() {}
/**
* @brief Retrieves all currently active MWMs.
*