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
e3492bb3
Commit
e3492bb3
authored
Dec 04, 2016
by
Jens Breitbart
Committed by
Jesse Beder
Dec 03, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix warnings generated by #438 (comparing unsigned value with <0).
parent
8ff7d76e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
src/emitterstate.cpp
+6
-4
No files found.
src/emitterstate.cpp
View file @
e3492bb3
...
...
@@ -124,7 +124,8 @@ void EmitterState::StartedScalar() {
void
EmitterState
::
StartedGroup
(
GroupType
::
value
type
)
{
StartedNode
();
const
std
::
size_t
lastGroupIndent
=
(
m_groups
.
empty
()
?
0
:
m_groups
.
back
()
->
indent
);
const
std
::
size_t
lastGroupIndent
=
(
m_groups
.
empty
()
?
0
:
m_groups
.
back
()
->
indent
);
m_curIndent
+=
lastGroupIndent
;
// TODO: Create move constructors for settings types to simplify transfer
...
...
@@ -348,14 +349,15 @@ bool EmitterState::SetMapKeyFormat(EMITTER_MANIP value, FmtScope::value scope) {
}
bool
EmitterState
::
SetFloatPrecision
(
std
::
size_t
value
,
FmtScope
::
value
scope
)
{
if
(
value
<
0
||
value
>
std
::
numeric_limits
<
float
>::
digits10
+
1
)
if
(
value
>
std
::
numeric_limits
<
float
>::
digits10
+
1
)
return
false
;
_Set
(
m_floatPrecision
,
value
,
scope
);
return
true
;
}
bool
EmitterState
::
SetDoublePrecision
(
std
::
size_t
value
,
FmtScope
::
value
scope
)
{
if
(
value
<
0
||
value
>
std
::
numeric_limits
<
double
>::
digits10
+
1
)
bool
EmitterState
::
SetDoublePrecision
(
std
::
size_t
value
,
FmtScope
::
value
scope
)
{
if
(
value
>
std
::
numeric_limits
<
double
>::
digits10
+
1
)
return
false
;
_Set
(
m_doublePrecision
,
value
,
scope
);
return
true
;
...
...
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