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
40066785
Unverified
Commit
40066785
authored
Mar 14, 2018
by
Jonathan Müller
Committed by
GitHub
Mar 14, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix warnings under MSVC (#679)
Closes #678.
parent
9c5f54a7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
8 deletions
+9
-8
include/fmt/core.h
include/fmt/core.h
+3
-2
include/fmt/format.h
include/fmt/format.h
+6
-6
No files found.
include/fmt/core.h
View file @
40066785
...
...
@@ -1064,8 +1064,9 @@ class basic_format_args {
unsigned
max_size
()
const
{
int64_t
signed_types
=
static_cast
<
int64_t
>
(
types_
);
return
signed_types
<
0
?
-
signed_types
:
static_cast
<
int64_t
>
(
internal
::
max_packed_args
);
return
static_cast
<
unsigned
>
(
signed_types
<
0
?
-
signed_types
:
static_cast
<
int64_t
>
(
internal
::
max_packed_args
));
}
};
...
...
include/fmt/format.h
View file @
40066785
...
...
@@ -1452,7 +1452,7 @@ class arg_formatter_base {
void
operator
()(
const
char_type
*
value
)
{
internal
::
handle_cstring_type_spec
(
s
pecs_
.
type_
,
cstring_spec_handler
(
*
this
,
value
));
s
tatic_cast
<
char
>
(
specs_
.
type_
)
,
cstring_spec_handler
(
*
this
,
value
));
}
void
operator
()(
basic_string_view
<
char_type
>
value
)
{
...
...
@@ -1461,7 +1461,7 @@ class arg_formatter_base {
}
void
operator
()(
const
void
*
value
)
{
check_pointer_type_spec
(
s
pecs_
.
type_
,
internal
::
error_handler
());
check_pointer_type_spec
(
s
tatic_cast
<
char
>
(
specs_
.
type_
)
,
internal
::
error_handler
());
write_pointer
(
value
);
}
};
...
...
@@ -2394,7 +2394,7 @@ class basic_writer {
void
on_hex
()
{
if
(
spec
.
flag
(
HASH_FLAG
))
{
prefix
[
prefix_size
++
]
=
'0'
;
prefix
[
prefix_size
++
]
=
s
pec
.
type
(
);
prefix
[
prefix_size
++
]
=
s
tatic_cast
<
char
>
(
spec
.
type
()
);
}
unsigned
num_digits
=
count_digits
<
4
>
();
writer
.
write_int
(
num_digits
,
get_prefix
(),
spec
,
...
...
@@ -2415,7 +2415,7 @@ class basic_writer {
void
on_bin
()
{
if
(
spec
.
flag
(
HASH_FLAG
))
{
prefix
[
prefix_size
++
]
=
'0'
;
prefix
[
prefix_size
++
]
=
s
pec
.
type
(
);
prefix
[
prefix_size
++
]
=
s
tatic_cast
<
char
>
(
spec
.
type
()
);
}
unsigned
num_digits
=
count_digits
<
1
>
();
writer
.
write_int
(
num_digits
,
get_prefix
(),
spec
,
...
...
@@ -2465,7 +2465,7 @@ class basic_writer {
// Writes a formatted integer.
template
<
typename
T
,
typename
Spec
>
void
write_int
(
T
value
,
const
Spec
&
spec
)
{
internal
::
handle_int_type_spec
(
s
pec
.
type
(
),
internal
::
handle_int_type_spec
(
s
tatic_cast
<
char
>
(
spec
.
type
()
),
int_writer
<
T
,
Spec
>
(
*
this
,
value
,
spec
));
}
...
...
@@ -2698,7 +2698,7 @@ template <typename T>
void
basic_writer
<
Range
>::
write_double
(
T
value
,
const
format_specs
&
spec
)
{
// Check type.
float_spec_handler
<
char_type
>
handler
(
spec
.
type
());
internal
::
handle_float_type_spec
(
s
pec
.
type
(
),
handler
);
internal
::
handle_float_type_spec
(
s
tatic_cast
<
char
>
(
spec
.
type
()
),
handler
);
char
sign
=
0
;
// Use isnegative instead of value < 0 because the latter is always
...
...
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