From: Durk Talsma Date: Fri, 3 Sep 2010 10:32:55 +0000 (+0200) Subject: Issue a warning when finding duplicate tail numbers. Note that this is far from a... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=aba57077fd690e7386913d311b789b53e5dae237;p=flightgear.git Issue a warning when finding duplicate tail numbers. Note that this is far from a fatal error, but does interfere with the startup heuristics data collection mechanism. --- diff --git a/src/Traffic/TrafficMgr.cxx b/src/Traffic/TrafficMgr.cxx index 5e649472c..f25516a26 100644 --- a/src/Traffic/TrafficMgr.cxx +++ b/src/Traffic/TrafficMgr.cxx @@ -200,6 +200,11 @@ void FGTrafficManager::init() data >> h.registration >> h.runCount >> h.hits; if (data.eof()) break; + HeuristicMapIterator itr = heurMap.find(h.registration); + if (itr != heurMap.end()) { + SG_LOG(SG_GENERAL, SG_WARN,"Traffic Manager Warning: found duplicate tailnumber " << + h.registration << " for AI aircraft"); + } heurMap[h.registration] = h; heuristics.push_back(h); }