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

+ 3 - 3
src/osmfixer/server/StatServer.cpp

@@ -316,7 +316,7 @@ 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
-    auto idx = _idxs[i].second;
319
+    const auto& idx = _idxs[i].second;
320
     auto range = _idxs[i].first;
320
     auto range = _idxs[i].first;
321
     if (sid >= range.sidStart && sid <= range.sidEnd) return i;
321
     if (sid >= range.sidStart && sid <= range.sidEnd) return i;
322
   }
322
   }
@@ -327,7 +327,7 @@ size_t StatServer::getDidBySid(size_t sid) const {
327
 // _____________________________________________________________________________
327
 // _____________________________________________________________________________
328
 size_t StatServer::getDidBySuggid(size_t suggid) const {
328
 size_t StatServer::getDidBySuggid(size_t suggid) const {
329
   for (size_t i = 0; i < _idxs.size(); i++) {
329
   for (size_t i = 0; i < _idxs.size(); i++) {
330
-    auto idx = _idxs[i].second;
330
+    const auto& idx = _idxs[i].second;
331
     auto range = _idxs[i].first;
331
     auto range = _idxs[i].first;
332
     if (suggid >= range.suggIdStart && suggid <= range.suggIdEnd) return i;
332
     if (suggid >= range.suggIdStart && suggid <= range.suggIdEnd) return i;
333
   }
333
   }
@@ -338,7 +338,7 @@ size_t StatServer::getDidBySuggid(size_t suggid) const {
338
 // _____________________________________________________________________________
338
 // _____________________________________________________________________________
339
 size_t StatServer::getDidByGid(size_t gid) const {
339
 size_t StatServer::getDidByGid(size_t gid) const {
340
   for (size_t i = 0; i < _idxs.size(); i++) {
340
   for (size_t i = 0; i < _idxs.size(); i++) {
341
-    auto idx = _idxs[i].second;
341
+    const auto& idx = _idxs[i].second;
342
     auto range = _idxs[i].first;
342
     auto range = _idxs[i].first;
343
     if (gid >= range.gidStart && gid <= range.gidEnd) return i;
343
     if (gid >= range.gidStart && gid <= range.gidEnd) return i;
344
   }
344
   }