Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
fmt
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
fmt
Commits
75fff1db
Commit
75fff1db
authored
Nov 24, 2019
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor cleanup
parent
28d7191c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
include/fmt/format-inl.h
include/fmt/format-inl.h
+2
-2
No files found.
include/fmt/format-inl.h
View file @
75fff1db
...
@@ -1038,11 +1038,11 @@ void fallback_format(Double d, buffer<char>& buf, int& exp10) {
...
@@ -1038,11 +1038,11 @@ void fallback_format(Double d, buffer<char>& buf, int& exp10) {
// Formats value using the Grisu algorithm
// Formats value using the Grisu algorithm
// (https://www.cs.tufts.edu/~nr/cs257/archive/florian-loitsch/printf.pdf)
// (https://www.cs.tufts.edu/~nr/cs257/archive/florian-loitsch/printf.pdf)
// if
Float
is a IEEE754 binary32 or binary64 and snprintf otherwise.
// if
T
is a IEEE754 binary32 or binary64 and snprintf otherwise.
template
<
typename
T
>
template
<
typename
T
>
int
format_float
(
T
value
,
int
precision
,
float_spec
spec
,
buffer
<
char
>&
buf
)
{
int
format_float
(
T
value
,
int
precision
,
float_spec
spec
,
buffer
<
char
>&
buf
)
{
FMT_ASSERT
(
value
>=
0
,
"value is negative"
);
static_assert
(
!
std
::
is_same
<
T
,
float
>
(),
""
);
static_assert
(
!
std
::
is_same
<
T
,
float
>
(),
""
);
FMT_ASSERT
(
value
>=
0
,
"value is negative"
);
const
bool
fixed
=
spec
.
format
==
float_format
::
fixed
;
const
bool
fixed
=
spec
.
format
==
float_format
::
fixed
;
if
(
value
<=
0
)
{
// <= instead of == to silence a warning.
if
(
value
<=
0
)
{
// <= instead of == to silence a warning.
...
...
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