"vscode:/vscode.git/clone" did not exist on "6c6a246461829d7ba6af26655c7418ad228a28f3"
Commit fb3b4917 authored by jbeder's avatar jbeder
Browse files

Moved the local structs from Emitter::Write(bool) to an anonymous namespace in...

Moved the local structs from Emitter::Write(bool) to an anonymous namespace in the hopes that Visual Studio <= 2003 will be happy
parent 357cd1e1
...@@ -606,6 +606,12 @@ namespace YAML ...@@ -606,6 +606,12 @@ namespace YAML
PostAtomicWrite(); 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) Emitter& Emitter::Write(bool b)
{ {
if(!good()) if(!good())
...@@ -615,10 +621,6 @@ namespace YAML ...@@ -615,10 +621,6 @@ namespace YAML
EmitSeparationIfNecessary(); EmitSeparationIfNecessary();
// set up all possible bools to write // 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 = { static const BoolTypes boolTypes = {
{ { "YES", "NO" }, { "yes", "no" }, { "Yes", "No" } }, { { "YES", "NO" }, { "yes", "no" }, { "Yes", "No" } },
{ { "TRUE", "FALSE" }, { "true", "false" }, { "True", "False" } }, { { "TRUE", "FALSE" }, { "true", "false" }, { "True", "False" } },
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment