mirror of
https://github.com/fmtlib/fmt.git
synced 2025-01-27 06:35:37 +00:00
Simplify the nvcc warning fix
This commit is contained in:
parent
911a75114b
commit
47d147b65d
@ -787,9 +787,8 @@ class arg_map {
|
|||||||
~arg_map() { delete [] map_; }
|
~arg_map() { delete [] map_; }
|
||||||
|
|
||||||
basic_format_arg<Context> find(basic_string_view<char_type> name) const {
|
basic_format_arg<Context> find(basic_string_view<char_type> 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.
|
// 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)
|
if (it->name == name)
|
||||||
return it->arg;
|
return it->arg;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user