Patrick Brosi 4 years ago
parent
commit
e1143d1afb
1 changed files with 1 additions and 4 deletions
  1. 1 4
      src/osmfixer/server/StatServer.cpp

+ 1 - 4
src/osmfixer/server/StatServer.cpp

@@ -316,7 +316,6 @@ std::string StatServer::parseUrl(std::string u, std::string pl,
316
 // _____________________________________________________________________________
316
 // _____________________________________________________________________________
317
 size_t StatServer::getDidBySid(size_t sid) const {
317
 size_t StatServer::getDidBySid(size_t sid) const {
318
   for (size_t i = 0; i < _idxs.size(); i++) {
318
   for (size_t i = 0; i < _idxs.size(); i++) {
319
-    const auto& idx = _idxs[i].second;
320
     auto range = _idxs[i].first;
319
     auto range = _idxs[i].first;
321
     if (sid >= range.sidStart && sid <= range.sidEnd) return i;
320
     if (sid >= range.sidStart && sid <= range.sidEnd) return i;
322
   }
321
   }
@@ -327,7 +326,6 @@ size_t StatServer::getDidBySid(size_t sid) const {
327
 // _____________________________________________________________________________
326
 // _____________________________________________________________________________
328
 size_t StatServer::getDidBySuggid(size_t suggid) const {
327
 size_t StatServer::getDidBySuggid(size_t suggid) const {
329
   for (size_t i = 0; i < _idxs.size(); i++) {
328
   for (size_t i = 0; i < _idxs.size(); i++) {
330
-    const auto& idx = _idxs[i].second;
331
     auto range = _idxs[i].first;
329
     auto range = _idxs[i].first;
332
     if (suggid >= range.suggIdStart && suggid <= range.suggIdEnd) return i;
330
     if (suggid >= range.suggIdStart && suggid <= range.suggIdEnd) return i;
333
   }
331
   }
@@ -338,7 +336,6 @@ size_t StatServer::getDidBySuggid(size_t suggid) const {
338
 // _____________________________________________________________________________
336
 // _____________________________________________________________________________
339
 size_t StatServer::getDidByGid(size_t gid) const {
337
 size_t StatServer::getDidByGid(size_t gid) const {
340
   for (size_t i = 0; i < _idxs.size(); i++) {
338
   for (size_t i = 0; i < _idxs.size(); i++) {
341
-    const auto& idx = _idxs[i].second;
342
     auto range = _idxs[i].first;
339
     auto range = _idxs[i].first;
343
     if (gid >= range.gidStart && gid <= range.gidEnd) return i;
340
     if (gid >= range.gidStart && gid <= range.gidEnd) return i;
344
   }
341
   }
@@ -400,7 +397,7 @@ util::http::Answer StatServer::handleGroupReq(const Params& pars) const {
400
     json << "{\"id\":" << sid + range.sidStart << ","
397
     json << "{\"id\":" << sid + range.sidStart << ","
401
          << "\"osmid\":" << stat->osmid << ","
398
          << "\"osmid\":" << stat->osmid << ","
402
          << "\"group\":" << stat->group + range.gidStart << ","
399
          << "\"group\":" << stat->group + range.gidStart << ","
403
-         << "\"orig_group\":" << stat->origGroup << ","
400
+         << "\"orig_group\":" << stat->origGroup + range.gidStart << ","
404
          << "\"attrs\":{";
401
          << "\"attrs\":{";
405
 
402
 
406
     char sep = ' ';
403
     char sep = ' ';