Fixing warning detected by additional compiler flags

This commit is contained in:
DennisOSRM 2012-09-19 14:17:14 +02:00
parent 1c415933da
commit 44b625520b
2 changed files with 7 additions and 9 deletions

View File

@ -67,9 +67,8 @@ public:
if ( xmlStrEqual( currentName, ( const xmlChar* ) "node" ) == 1 ) {
ImportNode n = _ReadXMLNode( );
/** Pass the unpacked node to the LUA call back **/
int ret = -1;
try {
ret = luabind::call_function<int>(
luabind::call_function<int>(
myLuaState,
"node_function",
boost::ref(n)
@ -92,9 +91,8 @@ public:
_Way way = _ReadXMLWay( );
/** Pass the unpacked way to the LUA call back **/
int ret = -1;
try {
ret = luabind::call_function<int>(
luabind::call_function<int>(
myLuaState,
"way_function",
boost::ref(way),
@ -286,7 +284,7 @@ private:
xmlChar* k = xmlTextReaderGetAttribute( inputReader, ( const xmlChar* ) "k" );
xmlChar* value = xmlTextReaderGetAttribute( inputReader, ( const xmlChar* ) "v" );
if ( k != NULL && value != NULL ) {
node.keyVals.Add(std::string( (char *) k ), std::string( (char *) value));
node.keyVals.Add(std::string( reinterpret_cast<char*>(k) ), std::string( reinterpret_cast<char*>(value)));
}
if ( k != NULL )
xmlFree( k );

View File

@ -41,7 +41,7 @@ class AlternativeRouting : private BasicRoutingInterface<QueryDataT>{
NodeID node;
int length;
int sharing;
const bool operator<(const RankedCandidateNode& other) const {
bool operator<(const RankedCandidateNode& other) const {
return (2*length + sharing) < (2*other.length + other.sharing);
}
};
@ -121,7 +121,7 @@ public:
BOOST_FOREACH(const PreselectedNode node, nodesThatPassPreselection) {
int lengthOfViaPath = 0, sharingOfViaPath = 0;
computeLengthAndSharingOfViaPath(phantomNodePair, node, &lengthOfViaPath, &sharingOfViaPath, offset, packedShortestPath);
computeLengthAndSharingOfViaPath(node, &lengthOfViaPath, &sharingOfViaPath, offset, packedShortestPath);
if(sharingOfViaPath <= VIAPATH_GAMMA*_upperBound)
rankedCandidates.push_back(RankedCandidateNode(node.first, lengthOfViaPath, sharingOfViaPath));
}
@ -130,7 +130,7 @@ public:
NodeID selectedViaNode = UINT_MAX;
int lengthOfViaPath = INT_MAX;
NodeID s_v_middle, v_t_middle;
NodeID s_v_middle = UINT_MAX, v_t_middle = UINT_MAX;
BOOST_FOREACH(const RankedCandidateNode candidate, rankedCandidates){
if(viaNodeCandidatePasses_T_Test(forwardHeap, backwardHeap, forwardHeap2, backwardHeap2, candidate, offset, _upperBound, &lengthOfViaPath, &s_v_middle, &v_t_middle)) {
// select first admissable
@ -169,7 +169,7 @@ private:
super::UnpackPath(packed_s_v_path, unpackedPath);
}
inline void computeLengthAndSharingOfViaPath(const PhantomNodes & phantomNodePair, const PreselectedNode& node, int *lengthOfViaPath, int *sharingOfViaPath,
inline void computeLengthAndSharingOfViaPath(const PreselectedNode& node, int *lengthOfViaPath, int *sharingOfViaPath,
const int offset, const std::deque<NodeID> & packedShortestPath) {
//compute and unpack <s,..,v> and <v,..,t> by exploring search spaces from v and intersecting against queues
//only half-searches have to be done at this stage