From fa328c5a789b114061f3d105ee5977480a3181df Mon Sep 17 00:00:00 2001 From: Dennis Luxen Date: Tue, 25 Jun 2013 13:27:39 -0400 Subject: [PATCH] don't about if timestamp is missing, just warn --- Server/DataStructures/QueryObjectsStorage.cpp | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/Server/DataStructures/QueryObjectsStorage.cpp b/Server/DataStructures/QueryObjectsStorage.cpp index 325cdb97d..df15f532c 100644 --- a/Server/DataStructures/QueryObjectsStorage.cpp +++ b/Server/DataStructures/QueryObjectsStorage.cpp @@ -22,14 +22,27 @@ or see http://www.gnu.org/licenses/agpl.txt. #include "QueryObjectsStorage.h" #include "../../Util/GraphLoader.h" -QueryObjectsStorage::QueryObjectsStorage(std::string hsgrPath, std::string ramIndexPath, std::string fileIndexPath, std::string nodesPath, std::string edgesPath, std::string namesPath, std::string timestampPath) { +QueryObjectsStorage::QueryObjectsStorage( + std::string hsgrPath, + std::string ramIndexPath, + std::string fileIndexPath, + std::string nodesPath, + std::string edgesPath, + std::string namesPath, + std::string timestampPath +) { INFO("loading graph data"); std::ifstream hsgrInStream(hsgrPath.c_str(), std::ios::binary); if(!hsgrInStream) { ERR(hsgrPath << " not found"); } //Deserialize road network graph std::vector< QueryGraph::_StrNode> nodeList; std::vector< QueryGraph::_StrEdge> edgeList; - const int n = readHSGRFromStream(hsgrInStream, nodeList, edgeList, &checkSum); + const int n = readHSGRFromStream( + hsgrInStream, + nodeList, + edgeList, + &checkSum + ); INFO("Data checksum is " << checkSum); graph = new QueryGraph(nodeList, edgeList); @@ -39,7 +52,7 @@ QueryObjectsStorage::QueryObjectsStorage(std::string hsgrPath, std::string ramIn if(timestampPath.length()) { INFO("Loading Timestamp"); std::ifstream timestampInStream(timestampPath.c_str()); - if(!timestampInStream) { ERR(timestampPath << " not found"); } + if(!timestampInStream) { WARN(timestampPath << " not found"); } getline(timestampInStream, timestamp); timestampInStream.close();