From 47d147b65d989412f1966ae83bbc46fb6c5425f8 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Mon, 4 Jun 2018 21:27:20 +0200 Subject: [PATCH] Simplify the nvcc warning fix --- include/fmt/core.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/fmt/core.h b/include/fmt/core.h index 094d1b6f..58b6c3e6 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -787,9 +787,8 @@ class arg_map { ~arg_map() { delete [] map_; } basic_format_arg find(basic_string_view name) const { - auto end = map_ + size_; // Define end outside of loop to make nvcc happy. // The list is unsorted, so just return the first matching name. - for (auto it = map_; it != end; ++it) { + for (entry *it = map_, *end = map_ + size_; it != end; ++it) { if (it->name == name) return it->arg; }