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
26e3b704
Unverified
Commit
26e3b704
authored
Feb 09, 2022
by
Sam4uk
Committed by
GitHub
Feb 08, 2022
Browse files
Update old style cast from (T) to static_cast<T>.
parent
cdf89fa3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
include/yaml-cpp/node/convert.h
include/yaml-cpp/node/convert.h
+1
-1
No files found.
include/yaml-cpp/node/convert.h
View file @
26e3b704
...
@@ -128,7 +128,7 @@ ConvertStreamTo(std::stringstream& stream, T& rhs) {
...
@@ -128,7 +128,7 @@ ConvertStreamTo(std::stringstream& stream, T& rhs) {
if
((
stream
>>
std
::
noskipws
>>
num
)
&&
(
stream
>>
std
::
ws
).
eof
())
{
if
((
stream
>>
std
::
noskipws
>>
num
)
&&
(
stream
>>
std
::
ws
).
eof
())
{
if
(
num
>=
(
std
::
numeric_limits
<
T
>::
min
)()
&&
if
(
num
>=
(
std
::
numeric_limits
<
T
>::
min
)()
&&
num
<=
(
std
::
numeric_limits
<
T
>::
max
)())
{
num
<=
(
std
::
numeric_limits
<
T
>::
max
)())
{
rhs
=
(
T
)
num
;
rhs
=
static_cast
<
T
>
(
num
)
;
return
true
;
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