mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-09 20:51:16 +00:00
Moved the local structs from Emitter::Write(bool) to an anonymous namespace in the hopes that Visual Studio <= 2003 will be happy
This commit is contained in:
@@ -606,6 +606,12 @@ namespace YAML
|
||||
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)
|
||||
{
|
||||
if(!good())
|
||||
@@ -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" } },
|
||||
|
Reference in New Issue
Block a user