mirror of
https://codeberg.org/comaps/comaps
synced 2026-01-01 10:33:45 +00:00
[traffxml] Fix compiler warnings
Signed-off-by: mvglasow <michael -at- vonglasow.com>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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.
|
||||
*
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -26,6 +26,8 @@ class TraffSource;
|
||||
class TraffSourceManager
|
||||
{
|
||||
public:
|
||||
virtual ~TraffSourceManager() {}
|
||||
|
||||
/**
|
||||
* @brief Retrieves all currently active MWMs.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user