Fixing warning detected by additional compiler flags
This commit is contained in:
parent
1c415933da
commit
44b625520b
@ -67,9 +67,8 @@ public:
|
|||||||
if ( xmlStrEqual( currentName, ( const xmlChar* ) "node" ) == 1 ) {
|
if ( xmlStrEqual( currentName, ( const xmlChar* ) "node" ) == 1 ) {
|
||||||
ImportNode n = _ReadXMLNode( );
|
ImportNode n = _ReadXMLNode( );
|
||||||
/** Pass the unpacked node to the LUA call back **/
|
/** Pass the unpacked node to the LUA call back **/
|
||||||
int ret = -1;
|
|
||||||
try {
|
try {
|
||||||
ret = luabind::call_function<int>(
|
luabind::call_function<int>(
|
||||||
myLuaState,
|
myLuaState,
|
||||||
"node_function",
|
"node_function",
|
||||||
boost::ref(n)
|
boost::ref(n)
|
||||||
@ -92,9 +91,8 @@ public:
|
|||||||
_Way way = _ReadXMLWay( );
|
_Way way = _ReadXMLWay( );
|
||||||
|
|
||||||
/** Pass the unpacked way to the LUA call back **/
|
/** Pass the unpacked way to the LUA call back **/
|
||||||
int ret = -1;
|
|
||||||
try {
|
try {
|
||||||
ret = luabind::call_function<int>(
|
luabind::call_function<int>(
|
||||||
myLuaState,
|
myLuaState,
|
||||||
"way_function",
|
"way_function",
|
||||||
boost::ref(way),
|
boost::ref(way),
|
||||||
@ -286,7 +284,7 @@ private:
|
|||||||
xmlChar* k = xmlTextReaderGetAttribute( inputReader, ( const xmlChar* ) "k" );
|
xmlChar* k = xmlTextReaderGetAttribute( inputReader, ( const xmlChar* ) "k" );
|
||||||
xmlChar* value = xmlTextReaderGetAttribute( inputReader, ( const xmlChar* ) "v" );
|
xmlChar* value = xmlTextReaderGetAttribute( inputReader, ( const xmlChar* ) "v" );
|
||||||
if ( k != NULL && value != NULL ) {
|
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 )
|
if ( k != NULL )
|
||||||
xmlFree( k );
|
xmlFree( k );
|
||||||
|
@ -41,7 +41,7 @@ class AlternativeRouting : private BasicRoutingInterface<QueryDataT>{
|
|||||||
NodeID node;
|
NodeID node;
|
||||||
int length;
|
int length;
|
||||||
int sharing;
|
int sharing;
|
||||||
const bool operator<(const RankedCandidateNode& other) const {
|
bool operator<(const RankedCandidateNode& other) const {
|
||||||
return (2*length + sharing) < (2*other.length + other.sharing);
|
return (2*length + sharing) < (2*other.length + other.sharing);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -121,7 +121,7 @@ public:
|
|||||||
BOOST_FOREACH(const PreselectedNode node, nodesThatPassPreselection) {
|
BOOST_FOREACH(const PreselectedNode node, nodesThatPassPreselection) {
|
||||||
int lengthOfViaPath = 0, sharingOfViaPath = 0;
|
int lengthOfViaPath = 0, sharingOfViaPath = 0;
|
||||||
|
|
||||||
computeLengthAndSharingOfViaPath(phantomNodePair, node, &lengthOfViaPath, &sharingOfViaPath, offset, packedShortestPath);
|
computeLengthAndSharingOfViaPath(node, &lengthOfViaPath, &sharingOfViaPath, offset, packedShortestPath);
|
||||||
if(sharingOfViaPath <= VIAPATH_GAMMA*_upperBound)
|
if(sharingOfViaPath <= VIAPATH_GAMMA*_upperBound)
|
||||||
rankedCandidates.push_back(RankedCandidateNode(node.first, lengthOfViaPath, sharingOfViaPath));
|
rankedCandidates.push_back(RankedCandidateNode(node.first, lengthOfViaPath, sharingOfViaPath));
|
||||||
}
|
}
|
||||||
@ -130,7 +130,7 @@ public:
|
|||||||
|
|
||||||
NodeID selectedViaNode = UINT_MAX;
|
NodeID selectedViaNode = UINT_MAX;
|
||||||
int lengthOfViaPath = INT_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){
|
BOOST_FOREACH(const RankedCandidateNode candidate, rankedCandidates){
|
||||||
if(viaNodeCandidatePasses_T_Test(forwardHeap, backwardHeap, forwardHeap2, backwardHeap2, candidate, offset, _upperBound, &lengthOfViaPath, &s_v_middle, &v_t_middle)) {
|
if(viaNodeCandidatePasses_T_Test(forwardHeap, backwardHeap, forwardHeap2, backwardHeap2, candidate, offset, _upperBound, &lengthOfViaPath, &s_v_middle, &v_t_middle)) {
|
||||||
// select first admissable
|
// select first admissable
|
||||||
@ -169,7 +169,7 @@ private:
|
|||||||
super::UnpackPath(packed_s_v_path, unpackedPath);
|
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) {
|
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
|
//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
|
//only half-searches have to be done at this stage
|
||||||
|
Loading…
Reference in New Issue
Block a user