Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
R
rapidjson
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
rapidjson
Commits
050be06e
Commit
050be06e
authored
May 05, 2015
by
Justin Scheiber
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixing conversion warnings
parent
97d489c2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
biginteger.h
include/rapidjson/internal/biginteger.h
+2
-2
diyfp.h
include/rapidjson/internal/diyfp.h
+2
-2
ieee754.h
include/rapidjson/internal/ieee754.h
+1
-1
No files found.
include/rapidjson/internal/biginteger.h
View file @
050be06e
...
...
@@ -97,7 +97,7 @@ public:
if
(
u
==
1
)
return
*
this
;
if
(
*
this
==
1
)
return
*
this
=
u
;
uint
32
_t
k
=
0
;
uint
64
_t
k
=
0
;
for
(
size_t
i
=
0
;
i
<
count_
;
i
++
)
{
const
uint64_t
c
=
digits_
[
i
]
>>
32
;
const
uint64_t
d
=
digits_
[
i
]
&
0xFFFFFFFF
;
...
...
@@ -246,7 +246,7 @@ private:
__extension__
typedef
unsigned
__int128
uint128
;
uint128
p
=
static_cast
<
uint128
>
(
a
)
*
static_cast
<
uint128
>
(
b
);
p
+=
k
;
*
outHigh
=
p
>>
64
;
*
outHigh
=
static_cast
<
uint64_t
>
(
p
>>
64
)
;
return
static_cast
<
uint64_t
>
(
p
);
#else
const
uint64_t
a0
=
a
&
0xFFFFFFFF
,
a1
=
a
>>
32
,
b0
=
b
&
0xFFFFFFFF
,
b1
=
b
>>
32
;
...
...
include/rapidjson/internal/diyfp.h
View file @
050be06e
...
...
@@ -45,7 +45,7 @@ struct DiyFp {
uint64_t
u64
;
}
u
=
{
d
};
int
biased_e
=
(
u
.
u64
&
kDpExponentMask
)
>>
kDpSignificandSize
;
int
biased_e
=
static_cast
<
int
>
((
u
.
u64
&
kDpExponentMask
)
>>
kDpSignificandSize
)
;
uint64_t
significand
=
(
u
.
u64
&
kDpSignificandMask
);
if
(
biased_e
!=
0
)
{
f
=
significand
+
kDpHiddenBit
;
...
...
@@ -71,7 +71,7 @@ struct DiyFp {
#elif (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) && defined(__x86_64__)
__extension__
typedef
unsigned
__int128
uint128
;
uint128
p
=
static_cast
<
uint128
>
(
f
)
*
static_cast
<
uint128
>
(
rhs
.
f
);
uint64_t
h
=
p
>>
64
;
uint64_t
h
=
static_cast
<
uint64_t
>
(
p
>>
64
)
;
uint64_t
l
=
static_cast
<
uint64_t
>
(
p
);
if
(
l
&
(
uint64_t
(
1
)
<<
63
))
// rounding
h
++
;
...
...
include/rapidjson/internal/ieee754.h
View file @
050be06e
...
...
@@ -36,7 +36,7 @@ public:
bool
Sign
()
const
{
return
(
u_
&
kSignMask
)
!=
0
;
}
uint64_t
Significand
()
const
{
return
u_
&
kSignificandMask
;
}
int
Exponent
()
const
{
return
((
u_
&
kExponentMask
)
>>
kSignificandSize
)
-
kExponentBias
;
}
int
Exponent
()
const
{
return
static_cast
<
int
>
(((
u_
&
kExponentMask
)
>>
kSignificandSize
)
-
kExponentBias
)
;
}
bool
IsNan
()
const
{
return
(
u_
&
kExponentMask
)
==
kExponentMask
&&
Significand
()
!=
0
;
}
bool
IsInf
()
const
{
return
(
u_
&
kExponentMask
)
==
kExponentMask
&&
Significand
()
==
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