Skip to content

Commit 4571e81

Browse files
authored
Fix compilation for Qt-projects (jbeder#918)
Not use 'emit' as variable name, in Qt Framework it reserved word
1 parent c82d312 commit 4571e81

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

include/yaml-cpp/stlemitter.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ namespace YAML {
1616
template <typename Seq>
1717
inline Emitter& EmitSeq(Emitter& emitter, const Seq& seq) {
1818
emitter << BeginSeq;
19-
for (const auto& emit : seq)
20-
emitter << emit;
19+
for (const auto& v : seq)
20+
emitter << v;
2121
emitter << EndSeq;
2222
return emitter;
2323
}
@@ -40,8 +40,8 @@ inline Emitter& operator<<(Emitter& emitter, const std::set<T>& v) {
4040
template <typename K, typename V>
4141
inline Emitter& operator<<(Emitter& emitter, const std::map<K, V>& m) {
4242
emitter << BeginMap;
43-
for (const auto& emit : m)
44-
emitter << Key << emit.first << Value << emit.second;
43+
for (const auto& v : m)
44+
emitter << Key << v.first << Value << v.second;
4545
emitter << EndMap;
4646
return emitter;
4747
}

0 commit comments

Comments
 (0)