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
87545b0a
Commit
87545b0a
authored
Mar 12, 2014
by
vitaut
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #28 from jdale88/vslevel4warnings
Fixed some level 4 warnings in VS2013
parents
7592eda4
4cabe162
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
5 deletions
+14
-5
format.cc
format.cc
+13
-4
format.h
format.h
+1
-1
No files found.
format.cc
View file @
87545b0a
...
...
@@ -39,6 +39,11 @@
using
fmt
::
ULongLong
;
#if _MSC_VER
# pragma warning(push)
# pragma warning(disable: 4127) // conditional expression is constant
#endif
namespace
{
#ifndef _MSC_VER
...
...
@@ -237,7 +242,7 @@ void fmt::BasicWriter<Char>::FormatDouble(
char
sign
=
0
;
// Use SignBit instead of value < 0 because the latter is always
// false for NaN.
if
(
SignBit
(
value
))
{
if
(
SignBit
(
static_cast
<
double
>
(
value
)
))
{
sign
=
'-'
;
value
=
-
value
;
}
else
if
(
spec
.
sign_flag
())
{
...
...
@@ -259,7 +264,7 @@ void fmt::BasicWriter<Char>::FormatDouble(
return
;
}
if
(
IsInf
(
value
))
{
if
(
IsInf
(
static_cast
<
double
>
(
value
)
))
{
// Format infinity ourselves because sprintf's output is not consistent
// across platforms.
std
::
size_t
size
=
4
;
...
...
@@ -628,7 +633,7 @@ void fmt::BasicFormatter<Char>::DoFormat() {
}
else
{
out
=
writer
.
GrowBuffer
(
1
);
}
*
out
=
arg
.
int_value
;
*
out
=
static_cast
<
Char
>
(
arg
.
int_value
)
;
break
;
}
case
STRING
:
{
...
...
@@ -667,7 +672,7 @@ void fmt::BasicFormatter<Char>::DoFormat() {
void
fmt
::
ColorWriter
::
operator
()(
const
fmt
::
BasicWriter
<
char
>
&
w
)
const
{
char
escape
[]
=
"
\x1b
[30m"
;
escape
[
3
]
=
'0'
+
color_
;
escape
[
3
]
=
'0'
+
static_cast
<
char
>
(
color_
)
;
std
::
fputs
(
escape
,
stdout
);
std
::
fwrite
(
w
.
data
(),
1
,
w
.
size
(),
stdout
);
std
::
fputs
(
RESET_COLOR
,
stdout
);
...
...
@@ -731,3 +736,7 @@ template void fmt::BasicFormatter<wchar_t>::CheckSign(
const
wchar_t
*&
s
,
const
Arg
&
arg
);
template
void
fmt
::
BasicFormatter
<
wchar_t
>
::
DoFormat
();
#if _MSC_VER
# pragma warning(pop)
#endif
format.h
View file @
87545b0a
...
...
@@ -81,7 +81,7 @@
#if _MSC_VER
# pragma warning(push)
# pragma warning(disable: 4521)
# pragma warning(disable: 4521)
// 'class' : multiple copy constructors specified
#endif
namespace
fmt
{
...
...
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