Patrick Brosi 4 vuotta sitten
vanhempi
commit
e1143d1afb
1 muutettua tiedostoa jossa 1 lisäystä ja 4 poistoa
  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 317
 size_t StatServer::getDidBySid(size_t sid) const {
318 318
   for (size_t i = 0; i < _idxs.size(); i++) {
319
-    const auto& idx = _idxs[i].second;
320 319
     auto range = _idxs[i].first;
321 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 327
 size_t StatServer::getDidBySuggid(size_t suggid) const {
329 328
   for (size_t i = 0; i < _idxs.size(); i++) {
330
-    const auto& idx = _idxs[i].second;
331 329
     auto range = _idxs[i].first;
332 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 337
 size_t StatServer::getDidByGid(size_t gid) const {
340 338
   for (size_t i = 0; i < _idxs.size(); i++) {
341
-    const auto& idx = _idxs[i].second;
342 339
     auto range = _idxs[i].first;
343 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 397
     json << "{\"id\":" << sid + range.sidStart << ","
401 398
          << "\"osmid\":" << stat->osmid << ","
402 399
          << "\"group\":" << stat->group + range.gidStart << ","
403
-         << "\"orig_group\":" << stat->origGroup << ","
400
+         << "\"orig_group\":" << stat->origGroup + range.gidStart << ","
404 401
          << "\"attrs\":{";
405 402
 
406 403
     char sep = ' ';