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) {