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
19de4a86
Commit
19de4a86
authored
Dec 01, 2015
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #236 from Jopie64/master
Silence some performance warnings in Visual Studio
parents
fac20781
328c8888
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
10 deletions
+16
-10
format.h
format.h
+16
-10
No files found.
format.h
View file @
19de4a86
...
@@ -28,7 +28,13 @@
...
@@ -28,7 +28,13 @@
#ifndef FMT_FORMAT_H_
#ifndef FMT_FORMAT_H_
#define FMT_FORMAT_H_
#define FMT_FORMAT_H_
#if defined _MSC_VER && _MSC_VER <= 1500
typedef
unsigned
int
uint32_t
;
typedef
unsigned
long
long
uint64_t
;
typedef
long
long
intmax_t
;
#else
#include <stdint.h>
#include <stdint.h>
#endif
#include <cassert>
#include <cassert>
#include <cmath>
#include <cmath>
...
@@ -256,7 +262,7 @@ class numeric_limits<fmt::internal::DummyInt> :
...
@@ -256,7 +262,7 @@ class numeric_limits<fmt::internal::DummyInt> :
// isinf macro > std::isinf > ::isinf > fmt::internal::isinf
// isinf macro > std::isinf > ::isinf > fmt::internal::isinf
if
(
check
(
sizeof
(
isinf
(
x
))
==
sizeof
(
bool
)
||
if
(
check
(
sizeof
(
isinf
(
x
))
==
sizeof
(
bool
)
||
sizeof
(
isinf
(
x
))
==
sizeof
(
int
)))
{
sizeof
(
isinf
(
x
))
==
sizeof
(
int
)))
{
return
isinf
(
x
);
return
!!
isinf
(
x
);
}
}
return
!
_finite
(
static_cast
<
double
>
(
x
));
return
!
_finite
(
static_cast
<
double
>
(
x
));
}
}
...
@@ -267,7 +273,7 @@ class numeric_limits<fmt::internal::DummyInt> :
...
@@ -267,7 +273,7 @@ class numeric_limits<fmt::internal::DummyInt> :
using
namespace
fmt
::
internal
;
using
namespace
fmt
::
internal
;
if
(
check
(
sizeof
(
isnan
(
x
))
==
sizeof
(
bool
)
||
if
(
check
(
sizeof
(
isnan
(
x
))
==
sizeof
(
bool
)
||
sizeof
(
isnan
(
x
))
==
sizeof
(
int
)))
{
sizeof
(
isnan
(
x
))
==
sizeof
(
int
)))
{
return
isnan
(
x
);
return
!!
isnan
(
x
);
}
}
return
_isnan
(
static_cast
<
double
>
(
x
))
!=
0
;
return
_isnan
(
static_cast
<
double
>
(
x
))
!=
0
;
}
}
...
@@ -276,7 +282,7 @@ class numeric_limits<fmt::internal::DummyInt> :
...
@@ -276,7 +282,7 @@ class numeric_limits<fmt::internal::DummyInt> :
static
bool
isnegative
(
double
x
)
{
static
bool
isnegative
(
double
x
)
{
using
namespace
fmt
::
internal
;
using
namespace
fmt
::
internal
;
if
(
check
(
sizeof
(
signbit
(
x
))
==
sizeof
(
int
)))
if
(
check
(
sizeof
(
signbit
(
x
))
==
sizeof
(
int
)))
return
signbit
(
x
);
return
!!
signbit
(
x
);
if
(
x
<
0
)
return
true
;
if
(
x
<
0
)
return
true
;
if
(
!
isnotanumber
(
x
))
return
false
;
if
(
!
isnotanumber
(
x
))
return
false
;
int
dec
=
0
,
sign
=
0
;
int
dec
=
0
,
sign
=
0
;
...
...
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