One more change in StringFormat
This commit is contained in:
parent
7febba3990
commit
3f14b084ff
@ -677,7 +677,7 @@ Emitter& Emitter::Write(const std::string& str) {
|
|||||||
return *this;
|
return *this;
|
||||||
|
|
||||||
const bool escapeNonAscii = m_pState->GetOutputCharset() == EscapeNonAscii;
|
const bool escapeNonAscii = m_pState->GetOutputCharset() == EscapeNonAscii;
|
||||||
const StringFormat::value strFormat =
|
const StringFormat strFormat =
|
||||||
Utils::ComputeStringFormat(str, m_pState->GetStringFormat(),
|
Utils::ComputeStringFormat(str, m_pState->GetStringFormat(),
|
||||||
m_pState->CurGroupFlowType(), escapeNonAscii);
|
m_pState->CurGroupFlowType(), escapeNonAscii);
|
||||||
|
|
||||||
|
|||||||
@ -260,7 +260,7 @@ bool WriteAliasName(ostream_wrapper& out, const std::string& str) {
|
|||||||
}
|
}
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
StringFormat::value ComputeStringFormat(const std::string& str,
|
StringFormat ComputeStringFormat(const std::string& str,
|
||||||
EMITTER_MANIP strFormat,
|
EMITTER_MANIP strFormat,
|
||||||
FlowType flowType,
|
FlowType flowType,
|
||||||
bool escapeNonAscii) {
|
bool escapeNonAscii) {
|
||||||
|
|||||||
@ -20,12 +20,15 @@ class ostream_wrapper;
|
|||||||
namespace YAML {
|
namespace YAML {
|
||||||
class Binary;
|
class Binary;
|
||||||
|
|
||||||
struct StringFormat {
|
enum class StringFormat {
|
||||||
enum value { Plain, SingleQuoted, DoubleQuoted, Literal };
|
Plain,
|
||||||
|
SingleQuoted,
|
||||||
|
DoubleQuoted,
|
||||||
|
Literal
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace Utils {
|
namespace Utils {
|
||||||
StringFormat::value ComputeStringFormat(const std::string& str,
|
StringFormat ComputeStringFormat(const std::string& str,
|
||||||
EMITTER_MANIP strFormat,
|
EMITTER_MANIP strFormat,
|
||||||
FlowType flowType,
|
FlowType flowType,
|
||||||
bool escapeNonAscii);
|
bool escapeNonAscii);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user