Fixes coverity issue
This commit is contained in:
parent
57a31d0ec9
commit
9f6d13f4c3
@ -24,7 +24,6 @@ or see http://www.gnu.org/licenses/agpl.txt.
|
|||||||
#include "BasePlugin.h"
|
#include "BasePlugin.h"
|
||||||
|
|
||||||
#include "../Algorithms/ObjectToBase64.h"
|
#include "../Algorithms/ObjectToBase64.h"
|
||||||
#include "../DataStructures/HashTable.h"
|
|
||||||
#include "../DataStructures/QueryEdge.h"
|
#include "../DataStructures/QueryEdge.h"
|
||||||
#include "../DataStructures/StaticGraph.h"
|
#include "../DataStructures/StaticGraph.h"
|
||||||
#include "../DataStructures/SearchEngine.h"
|
#include "../DataStructures/SearchEngine.h"
|
||||||
@ -35,6 +34,8 @@ or see http://www.gnu.org/licenses/agpl.txt.
|
|||||||
#include "../Util/SimpleLogger.h"
|
#include "../Util/SimpleLogger.h"
|
||||||
#include "../Util/StringUtil.h"
|
#include "../Util/StringUtil.h"
|
||||||
|
|
||||||
|
#include <boost/unordered_map.hpp>
|
||||||
|
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
@ -58,9 +59,9 @@ public:
|
|||||||
|
|
||||||
searchEnginePtr = new SearchEngine(objects);
|
searchEnginePtr = new SearchEngine(objects);
|
||||||
|
|
||||||
descriptorTable.insert(std::make_pair("" , 0));
|
// descriptorTable.emplace("" , 0);
|
||||||
descriptorTable.insert(std::make_pair("json", 0));
|
descriptorTable.emplace("json", 0);
|
||||||
descriptorTable.insert(std::make_pair("gpx" , 1));
|
descriptorTable.emplace("gpx" , 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ~ViaRoutePlugin() {
|
virtual ~ViaRoutePlugin() {
|
||||||
@ -129,7 +130,12 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
_DescriptorConfig descriptorConfig;
|
_DescriptorConfig descriptorConfig;
|
||||||
unsigned descriptorType = descriptorTable[routeParameters.outputFormat];
|
|
||||||
|
unsigned descriptorType = 0;
|
||||||
|
if(descriptorTable.find(routeParameters.outputFormat) != descriptorTable.end() ) {
|
||||||
|
descriptorType = descriptorTable.find(routeParameters.outputFormat)->second;
|
||||||
|
}
|
||||||
|
descriptorTable[routeParameters.outputFormat];
|
||||||
descriptorConfig.z = routeParameters.zoomLevel;
|
descriptorConfig.z = routeParameters.zoomLevel;
|
||||||
descriptorConfig.instructions = routeParameters.printInstructions;
|
descriptorConfig.instructions = routeParameters.printInstructions;
|
||||||
descriptorConfig.geometry = routeParameters.geometry;
|
descriptorConfig.geometry = routeParameters.geometry;
|
||||||
|
Loading…
Reference in New Issue
Block a user