From 12d0afa9290be94cb7e166efd51bf495b9b2cc89 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Sun, 12 Jul 2020 11:41:06 -0700 Subject: [PATCH] Fix some build warnings in fish_tests --- src/fish_tests.cpp | 4 ++-- src/lru.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/fish_tests.cpp b/src/fish_tests.cpp index a1557519e..b676c1f58 100644 --- a/src/fish_tests.cpp +++ b/src/fish_tests.cpp @@ -1780,7 +1780,7 @@ class test_lru_t : public lru_cache_t { std::vector values() const { std::vector result; - for (const auto &p : *this) { + for (auto p : *this) { result.push_back(p); } return result; @@ -1788,7 +1788,7 @@ class test_lru_t : public lru_cache_t { std::vector ints() const { std::vector result; - for (const auto &p : *this) { + for (auto p : *this) { result.push_back(p.second); } return result; diff --git a/src/lru.h b/src/lru.h index 1ed1412bb..4d930be87 100644 --- a/src/lru.h +++ b/src/lru.h @@ -318,7 +318,7 @@ class lru_cache_t { // Count iterators size_t iter_dist = 0; - for (const auto &p : *this) { + for (auto p : *this) { UNUSED(p); iter_dist++; }