replaced contigouos output data with collection of small'ish sub blocks. saves (re-)allocations. also removed a remaining stringstream

This commit is contained in:
Dennis Luxen
2013-11-14 17:16:26 -05:00
parent 8b6fe691ed
commit cabaad4b17
17 changed files with 391 additions and 305 deletions
+5 -3
View File
@@ -98,12 +98,14 @@ int main (int argc, const char * argv[]) {
routing_machine.RunQuery(route_parameters, osrm_reply);
std::cout << osrm_reply.content << std::endl;
//attention: super-inefficient hack below:
std::stringstream ss;
ss << osrm_reply.content;
BOOST_FOREACH(const std::string & line, osrm_reply.content) {
std::cout << line;
ss << line;
}
std::cout << std::endl;
boost::property_tree::ptree pt;
boost::property_tree::read_json(ss, pt);