From dce50142e6ad4940e1919e6301e6b14005b14ab6 Mon Sep 17 00:00:00 2001 From: ToruNiina Date: Mon, 10 May 2021 20:47:08 +0900 Subject: [PATCH] fix: avoid argname `key` to supress warning about shadowing --- toml/serializer.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/toml/serializer.hpp b/toml/serializer.hpp index 77aef58..b27abfd 100644 --- a/toml/serializer.hpp +++ b/toml/serializer.hpp @@ -26,19 +26,19 @@ namespace toml // a `"` and escaping some special character is boring. template std::basic_string -format_key(const std::basic_string& key) +format_key(const std::basic_string& k) { // check the key can be a bare (unquoted) key - detail::location loc(key, std::vector(key.begin(), key.end())); + detail::location loc(k, std::vector(k.begin(), k.end())); detail::lex_unquoted_key::invoke(loc); if(loc.iter() == loc.end()) { - return key; // all the tokens are consumed. the key is unquoted-key. + return k; // all the tokens are consumed. the key is unquoted-key. } //if it includes special characters, then format it in a "quoted" key. std::basic_string serialized("\""); - for(const char c : key) + for(const char c : k) { switch(c) {