Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
yaml-cpp
Commits
944ebb7d
Commit
944ebb7d
authored
May 22, 2012
by
Jesse Beder
Browse files
Fixed settings reverting properly
parent
bf07af52
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
src/emitter.cpp
src/emitter.cpp
+1
-1
src/emitterstate.cpp
src/emitterstate.cpp
+3
-0
util/sandbox.cpp
util/sandbox.cpp
+1
-4
No files found.
src/emitter.cpp
View file @
944ebb7d
...
@@ -402,7 +402,7 @@ namespace YAML
...
@@ -402,7 +402,7 @@ namespace YAML
case
EmitterNodeType
::
Scalar
:
case
EmitterNodeType
::
Scalar
:
case
EmitterNodeType
::
FlowSeq
:
case
EmitterNodeType
::
FlowSeq
:
case
EmitterNodeType
::
FlowMap
:
case
EmitterNodeType
::
FlowMap
:
SpaceOrIndentTo
(
m_pState
->
HasBegunContent
()
,
curIndent
);
SpaceOrIndentTo
(
true
,
curIndent
);
break
;
break
;
case
EmitterNodeType
::
BlockSeq
:
case
EmitterNodeType
::
BlockSeq
:
case
EmitterNodeType
::
BlockMap
:
case
EmitterNodeType
::
BlockMap
:
...
...
src/emitterstate.cpp
View file @
944ebb7d
...
@@ -106,6 +106,7 @@ namespace YAML
...
@@ -106,6 +106,7 @@ namespace YAML
void
EmitterState
::
StartedScalar
()
void
EmitterState
::
StartedScalar
()
{
{
StartedNode
();
StartedNode
();
ClearModifiedSettings
();
}
}
void
EmitterState
::
StartedGroup
(
GroupType
::
value
type
)
void
EmitterState
::
StartedGroup
(
GroupType
::
value
type
)
...
@@ -150,6 +151,8 @@ namespace YAML
...
@@ -150,6 +151,8 @@ namespace YAML
// some global settings that we changed may have been overridden
// some global settings that we changed may have been overridden
// by a local setting we just popped, so we need to restore them
// by a local setting we just popped, so we need to restore them
m_globalModifiedSettings
.
restore
();
m_globalModifiedSettings
.
restore
();
ClearModifiedSettings
();
}
}
EmitterNodeType
::
value
EmitterState
::
CurGroupNodeType
()
const
EmitterNodeType
::
value
EmitterState
::
CurGroupNodeType
()
const
...
...
util/sandbox.cpp
View file @
944ebb7d
...
@@ -5,10 +5,7 @@ int main()
...
@@ -5,10 +5,7 @@ int main()
{
{
YAML
::
Emitter
out
;
YAML
::
Emitter
out
;
out
<<
YAML
::
BeginMap
;
out
<<
YAML
::
BeginMap
;
out
<<
YAML
::
BeginMap
;
out
<<
YAML
::
LongKey
<<
"a"
<<
"b"
;
out
<<
"a"
<<
"b"
;
out
<<
YAML
::
EndMap
;
out
<<
YAML
::
BeginMap
;
out
<<
"a"
<<
"b"
;
out
<<
"a"
<<
"b"
;
out
<<
YAML
::
EndMap
;
out
<<
YAML
::
EndMap
;
out
<<
YAML
::
EndMap
;
out
<<
YAML
::
EndMap
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment