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
b498ba0b
Commit
b498ba0b
authored
Jul 26, 2014
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FormatFloat -> format_float (
https://github.com/cppformat/cppformat/issues/50
)
parent
37356c3f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
format.cc
format.cc
+3
-3
format.h
format.h
+2
-2
No files found.
format.cc
View file @
b498ba0b
...
...
@@ -223,7 +223,7 @@ void fmt::SystemError::init(
}
template
<
typename
T
>
int
fmt
::
internal
::
CharTraits
<
char
>::
FormatF
loat
(
int
fmt
::
internal
::
CharTraits
<
char
>::
format_f
loat
(
char
*
buffer
,
std
::
size_t
size
,
const
char
*
format
,
unsigned
width
,
int
precision
,
T
value
)
{
if
(
width
==
0
)
{
...
...
@@ -237,7 +237,7 @@ int fmt::internal::CharTraits<char>::FormatFloat(
}
template
<
typename
T
>
int
fmt
::
internal
::
CharTraits
<
wchar_t
>::
FormatF
loat
(
int
fmt
::
internal
::
CharTraits
<
wchar_t
>::
format_f
loat
(
wchar_t
*
buffer
,
std
::
size_t
size
,
const
wchar_t
*
format
,
unsigned
width
,
int
precision
,
T
value
)
{
if
(
width
==
0
)
{
...
...
@@ -614,7 +614,7 @@ void fmt::BasicWriter<Char>::write_double(T value, const FormatSpec &spec) {
}
#endif
Char
*
start
=
&
buffer_
[
offset
];
int
n
=
internal
::
CharTraits
<
Char
>::
FormatF
loat
(
int
n
=
internal
::
CharTraits
<
Char
>::
format_f
loat
(
start
,
size
,
format
,
width_for_sprintf
,
spec
.
precision
(),
value
);
if
(
n
>=
0
&&
offset
+
n
<
buffer_
.
capacity
())
{
if
(
sign
)
{
...
...
format.h
View file @
b498ba0b
...
...
@@ -366,7 +366,7 @@ public:
// Formats a floating-point number.
template
<
typename
T
>
static
int
FormatF
loat
(
char
*
buffer
,
std
::
size_t
size
,
static
int
format_f
loat
(
char
*
buffer
,
std
::
size_t
size
,
const
char
*
format
,
unsigned
width
,
int
precision
,
T
value
);
};
...
...
@@ -379,7 +379,7 @@ class CharTraits<wchar_t> : public BasicCharTraits<wchar_t> {
static
wchar_t
convert
(
wchar_t
value
)
{
return
value
;
}
template
<
typename
T
>
static
int
FormatF
loat
(
wchar_t
*
buffer
,
std
::
size_t
size
,
static
int
format_f
loat
(
wchar_t
*
buffer
,
std
::
size_t
size
,
const
wchar_t
*
format
,
unsigned
width
,
int
precision
,
T
value
);
};
...
...
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