Patrick Brosi 4 年 前
コミット
2af7e85db2
共有1 個のファイルを変更した3 個の追加3 個の削除を含む
  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 317
 size_t StatServer::getDidBySid(size_t sid) const {
318 318
   for (size_t i = 0; i < _idxs.size(); i++) {
319
-    auto idx = _idxs[i].second;
319
+    const auto& idx = _idxs[i].second;
320 320
     auto range = _idxs[i].first;
321 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 328
 size_t StatServer::getDidBySuggid(size_t suggid) const {
329 329
   for (size_t i = 0; i < _idxs.size(); i++) {
330
-    auto idx = _idxs[i].second;
330
+    const auto& idx = _idxs[i].second;
331 331
     auto range = _idxs[i].first;
332 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 339
 size_t StatServer::getDidByGid(size_t gid) const {
340 340
   for (size_t i = 0; i < _idxs.size(); i++) {
341
-    auto idx = _idxs[i].second;
341
+    const auto& idx = _idxs[i].second;
342 342
     auto range = _idxs[i].first;
343 343
     if (gid >= range.gidStart && gid <= range.gidEnd) return i;
344 344
   }