diff options
Diffstat (limited to 'src/libs/3rdparty/yaml-cpp/include/yaml-cpp/stlemitter.h')
-rw-r--r-- | src/libs/3rdparty/yaml-cpp/include/yaml-cpp/stlemitter.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/libs/3rdparty/yaml-cpp/include/yaml-cpp/stlemitter.h b/src/libs/3rdparty/yaml-cpp/include/yaml-cpp/stlemitter.h index 06780c861f..210a2f64e6 100644 --- a/src/libs/3rdparty/yaml-cpp/include/yaml-cpp/stlemitter.h +++ b/src/libs/3rdparty/yaml-cpp/include/yaml-cpp/stlemitter.h @@ -16,8 +16,8 @@ namespace YAML { template <typename Seq> inline Emitter& EmitSeq(Emitter& emitter, const Seq& seq) { emitter << BeginSeq; - for (typename Seq::const_iterator it = seq.begin(); it != seq.end(); ++it) - emitter << *it; + for (const auto& v : seq) + emitter << v; emitter << EndSeq; return emitter; } @@ -39,10 +39,9 @@ inline Emitter& operator<<(Emitter& emitter, const std::set<T>& v) { template <typename K, typename V> inline Emitter& operator<<(Emitter& emitter, const std::map<K, V>& m) { - typedef typename std::map<K, V> map; emitter << BeginMap; - for (typename map::const_iterator it = m.begin(); it != m.end(); ++it) - emitter << Key << it->first << Value << it->second; + for (const auto& v : m) + emitter << Key << v.first << Value << v.second; emitter << EndMap; return emitter; } |