From 2faeb76e2d159cb28d066df326b10d10b71441af Mon Sep 17 00:00:00 2001 From: Jesse Beder Date: Wed, 2 Mar 2011 05:21:25 +0000 Subject: [PATCH] Moved the local structs from Emitter::Write(bool) to an anonymous namespace in the hopes that Visual Studio <= 2003 will be happy --- src/emitter.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/emitter.cpp b/src/emitter.cpp index 30e422d..03555ea 100644 --- a/src/emitter.cpp +++ b/src/emitter.cpp @@ -605,6 +605,12 @@ namespace YAML m_stream << str.str(); PostAtomicWrite(); } + + namespace { + struct BoolName { std::string trueName, falseName; }; + struct BoolFormatNames { BoolName upper, lower, camel; }; + struct BoolTypes { BoolFormatNames yesNo, trueFalse, onOff; }; + } Emitter& Emitter::Write(bool b) { @@ -615,10 +621,6 @@ namespace YAML EmitSeparationIfNecessary(); // set up all possible bools to write - struct BoolName { std::string trueName, falseName; }; - struct BoolFormatNames { BoolName upper, lower, camel; }; - struct BoolTypes { BoolFormatNames yesNo, trueFalse, onOff; }; - static const BoolTypes boolTypes = { { { "YES", "NO" }, { "yes", "no" }, { "Yes", "No" } }, { { "TRUE", "FALSE" }, { "true", "false" }, { "True", "False" } },