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
aeee70a8
Commit
aeee70a8
authored
Sep 06, 2021
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unnecessary cast
parent
c771ba36
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
include/fmt/format.h
include/fmt/format.h
+3
-4
No files found.
include/fmt/format.h
View file @
aeee70a8
...
@@ -1551,8 +1551,7 @@ FMT_CONSTEXPR FMT_INLINE auto write_int(OutputIt out, write_int_arg<T> arg,
...
@@ -1551,8 +1551,7 @@ FMT_CONSTEXPR FMT_INLINE auto write_int(OutputIt out, write_int_arg<T> arg,
static_assert
(
std
::
is_same
<
T
,
uint32_or_64_or_128_t
<
T
>>::
value
,
""
);
static_assert
(
std
::
is_same
<
T
,
uint32_or_64_or_128_t
<
T
>>::
value
,
""
);
auto
abs_value
=
arg
.
abs_value
;
auto
abs_value
=
arg
.
abs_value
;
auto
prefix
=
arg
.
prefix
;
auto
prefix
=
arg
.
prefix
;
auto
pres_type
=
static_cast
<
presentation_type
>
(
specs
.
type
);
switch
(
specs
.
type
)
{
switch
(
pres_type
)
{
case
presentation_type
:
:
none
:
case
presentation_type
:
:
none
:
case
presentation_type
:
:
dec
:
{
case
presentation_type
:
:
dec
:
{
if
(
specs
.
localized
&&
if
(
specs
.
localized
&&
...
@@ -1568,7 +1567,7 @@ FMT_CONSTEXPR FMT_INLINE auto write_int(OutputIt out, write_int_arg<T> arg,
...
@@ -1568,7 +1567,7 @@ FMT_CONSTEXPR FMT_INLINE auto write_int(OutputIt out, write_int_arg<T> arg,
}
}
case
presentation_type
:
:
hex_lower
:
case
presentation_type
:
:
hex_lower
:
case
presentation_type
:
:
hex_upper
:
{
case
presentation_type
:
:
hex_upper
:
{
bool
upper
=
pres_
type
==
presentation_type
::
hex_upper
;
bool
upper
=
specs
.
type
==
presentation_type
::
hex_upper
;
if
(
specs
.
alt
)
if
(
specs
.
alt
)
prefix_append
(
prefix
,
unsigned
(
upper
?
'X'
:
'x'
)
<<
8
|
'0'
);
prefix_append
(
prefix
,
unsigned
(
upper
?
'X'
:
'x'
)
<<
8
|
'0'
);
int
num_digits
=
count_digits
<
4
>
(
abs_value
);
int
num_digits
=
count_digits
<
4
>
(
abs_value
);
...
@@ -1579,7 +1578,7 @@ FMT_CONSTEXPR FMT_INLINE auto write_int(OutputIt out, write_int_arg<T> arg,
...
@@ -1579,7 +1578,7 @@ FMT_CONSTEXPR FMT_INLINE auto write_int(OutputIt out, write_int_arg<T> arg,
}
}
case
presentation_type
:
:
bin_lower
:
case
presentation_type
:
:
bin_lower
:
case
presentation_type
:
:
bin_upper
:
{
case
presentation_type
:
:
bin_upper
:
{
bool
upper
=
pres_
type
==
presentation_type
::
bin_upper
;
bool
upper
=
specs
.
type
==
presentation_type
::
bin_upper
;
if
(
specs
.
alt
)
if
(
specs
.
alt
)
prefix_append
(
prefix
,
unsigned
(
upper
?
'B'
:
'b'
)
<<
8
|
'0'
);
prefix_append
(
prefix
,
unsigned
(
upper
?
'B'
:
'b'
)
<<
8
|
'0'
);
int
num_digits
=
count_digits
<
1
>
(
abs_value
);
int
num_digits
=
count_digits
<
1
>
(
abs_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