One more change in StringFormat

This commit is contained in:
hyperxor 2020-02-08 21:33:45 +03:00
parent 7febba3990
commit 3f14b084ff
3 changed files with 8 additions and 5 deletions

View File

@ -677,7 +677,7 @@ Emitter& Emitter::Write(const std::string& str) {
return *this;
const bool escapeNonAscii = m_pState->GetOutputCharset() == EscapeNonAscii;
const StringFormat::value strFormat =
const StringFormat strFormat =
Utils::ComputeStringFormat(str, m_pState->GetStringFormat(),
m_pState->CurGroupFlowType(), escapeNonAscii);

View File

@ -260,7 +260,7 @@ bool WriteAliasName(ostream_wrapper& out, const std::string& str) {
}
} // namespace
StringFormat::value ComputeStringFormat(const std::string& str,
StringFormat ComputeStringFormat(const std::string& str,
EMITTER_MANIP strFormat,
FlowType flowType,
bool escapeNonAscii) {

View File

@ -20,12 +20,15 @@ class ostream_wrapper;
namespace YAML {
class Binary;
struct StringFormat {
enum value { Plain, SingleQuoted, DoubleQuoted, Literal };
enum class StringFormat {
Plain,
SingleQuoted,
DoubleQuoted,
Literal
};
namespace Utils {
StringFormat::value ComputeStringFormat(const std::string& str,
StringFormat ComputeStringFormat(const std::string& str,
EMITTER_MANIP strFormat,
FlowType flowType,
bool escapeNonAscii);