From 3b6417de00dc1f33ee99625bccb236a1b6ecbf26 Mon Sep 17 00:00:00 2001 From: Jordan Williams <19399197+jwillikers@users.noreply.github.com> Date: Tue, 11 Feb 2020 06:13:55 -0600 Subject: [PATCH] fix clang range-loop-analysis warnings --- toml/region.hpp | 2 +- toml/serializer.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/toml/region.hpp b/toml/region.hpp index bf9ba12..77ba943 100644 --- a/toml/region.hpp +++ b/toml/region.hpp @@ -511,7 +511,7 @@ inline std::string format_underline(const std::string& message, retval << '\n'; retval << make_string(static_cast(line_num_width + 1), ' '); retval << color::bold << color::blue << " | " << color::reset; - for(const auto help : helps) + for(const auto& help : helps) { retval << color::bold << "\nHint: " << color::reset; retval << help; diff --git a/toml/serializer.hpp b/toml/serializer.hpp index 6503f08..1a65d2b 100644 --- a/toml/serializer.hpp +++ b/toml/serializer.hpp @@ -619,7 +619,7 @@ struct serializer // print non-table stuff first. because after printing [foo.bar], the // remaining non-table values will be assigned into [foo.bar], not [foo] - for(const auto kv : v) + for(const auto& kv : v) { if(kv.second.is_table() || is_array_of_tables(kv.second)) {