@@ -155,13 +155,13 @@ inline bool StrtodDiyFp(const char* decimals, int dLen, int dExp, double* result
155
155
DiyFp cachedPower = GetCachedPower10 (dExp, &actualExp);
156
156
if (actualExp != dExp) {
157
157
static const DiyFp kPow10 [] = {
158
- DiyFp (RAPIDJSON_UINT64_C2 (0xa0000000 , 00000000 ), -60 ), // 10^1
159
- DiyFp (RAPIDJSON_UINT64_C2 (0xc8000000 , 00000000 ), -57 ), // 10^2
160
- DiyFp (RAPIDJSON_UINT64_C2 (0xfa000000 , 00000000 ), -54 ), // 10^3
161
- DiyFp (RAPIDJSON_UINT64_C2 (0x9c400000 , 00000000 ), -50 ), // 10^4
162
- DiyFp (RAPIDJSON_UINT64_C2 (0xc3500000 , 00000000 ), -47 ), // 10^5
163
- DiyFp (RAPIDJSON_UINT64_C2 (0xf4240000 , 00000000 ), -44 ), // 10^6
164
- DiyFp (RAPIDJSON_UINT64_C2 (0x98968000 , 00000000 ), -40 ) // 10^7
158
+ DiyFp (RAPIDJSON_UINT64_C2 (0xa0000000 , 0x00000000 ), -60 ), // 10^1
159
+ DiyFp (RAPIDJSON_UINT64_C2 (0xc8000000 , 0x00000000 ), -57 ), // 10^2
160
+ DiyFp (RAPIDJSON_UINT64_C2 (0xfa000000 , 0x00000000 ), -54 ), // 10^3
161
+ DiyFp (RAPIDJSON_UINT64_C2 (0x9c400000 , 0x00000000 ), -50 ), // 10^4
162
+ DiyFp (RAPIDJSON_UINT64_C2 (0xc3500000 , 0x00000000 ), -47 ), // 10^5
163
+ DiyFp (RAPIDJSON_UINT64_C2 (0xf4240000 , 0x00000000 ), -44 ), // 10^6
164
+ DiyFp (RAPIDJSON_UINT64_C2 (0x98968000 , 0x00000000 ), -40 ) // 10^7
165
165
};
166
166
int adjustment = dExp - actualExp;
167
167
RAPIDJSON_ASSERT (adjustment >= 1 && adjustment < 8 );
@@ -204,9 +204,9 @@ inline bool StrtodDiyFp(const char* decimals, int dLen, int dExp, double* result
204
204
return halfWay - static_cast <unsigned >(error) >= precisionBits || precisionBits >= halfWay + static_cast <unsigned >(error);
205
205
}
206
206
207
- inline double StrtodBigInteger (double approx, const char * decimals, int length , int dExp) {
208
- RAPIDJSON_ASSERT (length >= 0 );
209
- const BigInteger dInt (decimals, static_cast <unsigned >(length ));
207
+ inline double StrtodBigInteger (double approx, const char * decimals, int dLen , int dExp) {
208
+ RAPIDJSON_ASSERT (dLen >= 0 );
209
+ const BigInteger dInt (decimals, static_cast <unsigned >(dLen ));
210
210
Double a (approx);
211
211
int cmp = CheckWithinHalfULP (a.Value (), dInt, dExp);
212
212
if (cmp < 0 )
@@ -226,7 +226,7 @@ inline double StrtodFullPrecision(double d, int p, const char* decimals, size_t
226
226
RAPIDJSON_ASSERT (d >= 0.0 );
227
227
RAPIDJSON_ASSERT (length >= 1 );
228
228
229
- double result;
229
+ double result = 0.0 ;
230
230
if (StrtodFast (d, p, &result))
231
231
return result;
232
232
0 commit comments