fix and/or remove unused variables
This commit is contained in:
parent
ef7619d664
commit
ace59411cb
@ -290,10 +290,12 @@ void EdgeBasedGraphFactory::InsertEdgeBasedNode(
|
|||||||
BOOST_ASSERT( v != SPECIAL_NODEID );
|
BOOST_ASSERT( v != SPECIAL_NODEID );
|
||||||
BOOST_ASSERT( e1 != SPECIAL_EDGEID );
|
BOOST_ASSERT( e1 != SPECIAL_EDGEID );
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
// find forward edge id and
|
// find forward edge id and
|
||||||
const EdgeID e1b = m_node_based_graph->FindEdge(u, v);
|
const EdgeID e1b = m_node_based_graph->FindEdge(u, v);
|
||||||
BOOST_ASSERT( e1 == e1b );
|
BOOST_ASSERT( e1 == e1b );
|
||||||
|
#endif
|
||||||
|
|
||||||
BOOST_ASSERT( e1 != SPECIAL_EDGEID );
|
BOOST_ASSERT( e1 != SPECIAL_EDGEID );
|
||||||
const EdgeData & forward_data = m_node_based_graph->GetEdgeData(e1);
|
const EdgeData & forward_data = m_node_based_graph->GetEdgeData(e1);
|
||||||
|
|
||||||
|
@ -29,6 +29,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#ifndef INPUTREADERFACTORY_H
|
#ifndef INPUTREADERFACTORY_H
|
||||||
#define INPUTREADERFACTORY_H
|
#define INPUTREADERFACTORY_H
|
||||||
|
|
||||||
|
#include <boost/assert.hpp>
|
||||||
|
|
||||||
#include <bzlib.h>
|
#include <bzlib.h>
|
||||||
#include <libxml/xmlreader.h>
|
#include <libxml/xmlreader.h>
|
||||||
|
|
||||||
@ -51,21 +53,21 @@ int readFromBz2Stream( void* pointer, char* buffer, int len ) {
|
|||||||
return read;
|
return read;
|
||||||
} else if(BZ_STREAM_END == context->error) {
|
} else if(BZ_STREAM_END == context->error) {
|
||||||
BZ2_bzReadGetUnused(&context->error, context->bz2, &unusedTmpVoid, &context->nUnused);
|
BZ2_bzReadGetUnused(&context->error, context->bz2, &unusedTmpVoid, &context->nUnused);
|
||||||
if(BZ_OK != context->error) {std::cerr << "Could not BZ2_bzReadGetUnused" <<std::endl; exit(-1);};
|
BOOST_ASSERT_MSG(BZ_OK == context->error, "Could not BZ2_bzReadGetUnused");
|
||||||
unusedTmp = (char*)unusedTmpVoid;
|
unusedTmp = (char*)unusedTmpVoid;
|
||||||
for(int i=0;i<context->nUnused;i++) {
|
for(int i=0;i<context->nUnused;i++) {
|
||||||
context->unused[i] = unusedTmp[i];
|
context->unused[i] = unusedTmp[i];
|
||||||
}
|
}
|
||||||
BZ2_bzReadClose(&context->error, context->bz2);
|
BZ2_bzReadClose(&context->error, context->bz2);
|
||||||
if(BZ_OK != context->error) {std::cerr << "Could not BZ2_bzReadClose" <<std::endl; exit(-1);};
|
BOOST_ASSERT_MSG(BZ_OK == context->error, "Could not BZ2_bzReadClose");
|
||||||
context->error = BZ_STREAM_END; // set to the stream end for next call to this function
|
context->error = BZ_STREAM_END; // set to the stream end for next call to this function
|
||||||
if(0 == context->nUnused && feof(context->file)) {
|
if(0 == context->nUnused && feof(context->file)) {
|
||||||
return read;
|
return read;
|
||||||
} else {
|
} else {
|
||||||
context->bz2 = BZ2_bzReadOpen(&context->error, context->file, 0, 0, context->unused, context->nUnused);
|
context->bz2 = BZ2_bzReadOpen(&context->error, context->file, 0, 0, context->unused, context->nUnused);
|
||||||
if(NULL == context->bz2){std::cerr << "Could not open file" <<std::endl; exit(-1);};
|
BOOST_ASSERT_MSG(NULL != context->bz2, "Could not open file");
|
||||||
}
|
}
|
||||||
} else { std::cerr << "Could not read bz2 file" << std::endl; exit(-1); }
|
} else { BOOST_ASSERT_MSG(false, "Could not read bz2 file"); }
|
||||||
}
|
}
|
||||||
return read;
|
return read;
|
||||||
}
|
}
|
||||||
|
@ -131,12 +131,6 @@ public:
|
|||||||
|
|
||||||
//check if first segment is non-zero
|
//check if first segment is non-zero
|
||||||
std::string road_name;
|
std::string road_name;
|
||||||
int source_duration = phantom_nodes.source_phantom.GetForwardWeightPlusOffset();
|
|
||||||
if (!raw_route.source_traversed_in_reverse)
|
|
||||||
{
|
|
||||||
source_duration = phantom_nodes.source_phantom.GetReverseWeightPlusOffset();
|
|
||||||
}
|
|
||||||
BOOST_ASSERT(source_duration >= 0);
|
|
||||||
road_name = facade->GetEscapedNameForNameID(phantom_nodes.source_phantom.name_id);
|
road_name = facade->GetEscapedNameForNameID(phantom_nodes.source_phantom.name_id);
|
||||||
|
|
||||||
// for each unpacked segment add the leg to the description
|
// for each unpacked segment add the leg to the description
|
||||||
@ -156,13 +150,6 @@ public:
|
|||||||
//check if last segment is non-zero
|
//check if last segment is non-zero
|
||||||
road_name = facade->GetEscapedNameForNameID(phantom_nodes.target_phantom.name_id);
|
road_name = facade->GetEscapedNameForNameID(phantom_nodes.target_phantom.name_id);
|
||||||
|
|
||||||
int target_duration = phantom_nodes.target_phantom.GetForwardWeightPlusOffset();
|
|
||||||
if (raw_route.target_traversed_in_reverse)
|
|
||||||
{
|
|
||||||
target_duration = phantom_nodes.target_phantom.GetReverseWeightPlusOffset();
|
|
||||||
}
|
|
||||||
BOOST_ASSERT(target_duration >= 0);
|
|
||||||
|
|
||||||
description_factory.SetStartSegment(phantom_nodes.source_phantom, raw_route.source_traversed_in_reverse);
|
description_factory.SetStartSegment(phantom_nodes.source_phantom, raw_route.source_traversed_in_reverse);
|
||||||
reply.content.push_back("0,"
|
reply.content.push_back("0,"
|
||||||
"\"status_message\": \"Found route between points\",");
|
"\"status_message\": \"Found route between points\",");
|
||||||
|
Loading…
Reference in New Issue
Block a user