Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yaml-cpp
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
yaml-cpp
Commits
23fb2dc8
Commit
23fb2dc8
authored
May 21, 2012
by
Jesse Beder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed basic block seq indentation
parent
b5d8241d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
5 deletions
+13
-5
src/emitter.cpp
+7
-5
src/emitterstate.cpp
+5
-0
src/emitterstate.h
+1
-0
No files found.
src/emitter.cpp
View file @
23fb2dc8
...
...
@@ -313,12 +313,14 @@ namespace YAML
void
Emitter
::
BlockSeqPrepareNode
()
{
const
unsigned
curIndent
=
m_pState
->
CurIndent
();
if
(
m_stream
.
col
()
>
curIndent
)
{
m_stream
<<
"
\n
"
;
if
(
!
m_pState
->
HasTag
()
&&
!
m_pState
->
HasAnchor
())
{
if
(
m_pState
->
CurGroupChildCount
()
>
0
)
{
m_stream
<<
"
\n
"
;
}
m_stream
<<
IndentTo
(
curIndent
);
m_stream
<<
"-"
;
m_stream
<<
IndentTo
(
curIndent
+
m_pState
->
CurGroupIndent
());
}
m_stream
<<
IndentTo
(
curIndent
);
m_stream
<<
"-"
;
m_stream
<<
IndentTo
(
curIndent
+
m_pState
->
CurGroupIndent
());
}
void
Emitter
::
FlowMapPrepareNode
()
...
...
src/emitterstate.cpp
View file @
23fb2dc8
...
...
@@ -119,6 +119,11 @@ namespace YAML
return
m_groups
.
empty
()
?
0
:
m_groups
.
top
().
indent
;
}
std
::
size_t
EmitterState
::
CurGroupChildCount
()
const
{
return
m_groups
.
empty
()
?
0
:
m_groups
.
top
().
childCount
;
}
void
EmitterState
::
ClearModifiedSettings
()
{
m_modifiedSettings
.
clear
();
...
...
src/emitterstate.h
View file @
23fb2dc8
...
...
@@ -40,6 +40,7 @@ namespace YAML
GroupType
::
value
CurGroupType
()
const
;
FlowType
::
value
CurGroupFlowType
()
const
;
int
CurGroupIndent
()
const
;
std
::
size_t
CurGroupChildCount
()
const
;
int
CurIndent
()
const
{
return
m_curIndent
;
}
bool
HasAnchor
()
const
{
return
m_hasAnchor
;
}
bool
HasTag
()
const
{
return
m_hasTag
;
}
...
...
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