Skip to content

Commit 4170686

Browse files
committed
Fixed MSVC build and some warnings.
1 parent 0a95f34 commit 4170686

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

src/common/DecFloat.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ unsigned digits(const unsigned pMax, unsigned char* const coeff, int& exp)
133133
return 0;
134134
}
135135

136-
void make(unsigned int* key,
136+
void make(ULONG* key,
137137
const unsigned pMax, const int bias, const unsigned decSize,
138138
unsigned char* coeff, int sign, int exp)
139139
{
@@ -165,7 +165,7 @@ void make(unsigned int* key,
165165
}
166166
}
167167

168-
void grab(unsigned int* key,
168+
void grab(ULONG* key,
169169
const unsigned pMax, const int bias, const unsigned decSize,
170170
unsigned char* bcd, int& sign, int& exp)
171171
{
@@ -363,7 +363,7 @@ Decimal64 Decimal64::neg() const
363363
return rc;
364364
}
365365

366-
void Decimal64::makeKey(unsigned int* key) const
366+
void Decimal64::makeKey(ULONG* key) const
367367
{
368368
unsigned char coeff[DECDOUBLE_Pmax];
369369
int sign = decDoubleGetCoefficient(&dec, coeff);
@@ -372,7 +372,7 @@ void Decimal64::makeKey(unsigned int* key) const
372372
make(key, DECDOUBLE_Pmax, DECDOUBLE_Bias, sizeof(dec), coeff, sign, exp);
373373
}
374374

375-
void Decimal64::grabKey(unsigned int* key)
375+
void Decimal64::grabKey(ULONG* key)
376376
{
377377
int exp, sign;
378378
unsigned char bcd[DECDOUBLE_Pmax];
@@ -762,7 +762,7 @@ Decimal128 Decimal128::log10(DecimalStatus decSt) const
762762
return rc;
763763
}
764764

765-
void Decimal128::makeKey(unsigned int* key) const
765+
void Decimal128::makeKey(ULONG* key) const
766766
{
767767
unsigned char coeff[DECQUAD_Pmax];
768768
int sign = decQuadGetCoefficient(&dec, coeff);
@@ -771,7 +771,7 @@ void Decimal128::makeKey(unsigned int* key) const
771771
make(key, DECQUAD_Pmax, DECQUAD_Bias, sizeof(dec), coeff, sign, exp);
772772
}
773773

774-
void Decimal128::grabKey(unsigned int* key)
774+
void Decimal128::grabKey(ULONG* key)
775775
{
776776
int exp, sign;
777777
unsigned char bcd[DECQUAD_Pmax];

src/common/DecFloat.h

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ class Decimal64
8686
bool isInf() const;
8787
bool isNan() const;
8888

89-
void makeKey(unsigned int* key) const;
90-
void grabKey(unsigned int* key);
89+
void makeKey(ULONG* key) const;
90+
void grabKey(ULONG* key);
9191

9292
Decimal64 quantize(DecimalStatus decSt, Decimal64 op2) const;
9393
Decimal64 normalize(DecimalStatus decSt) const;
@@ -142,8 +142,8 @@ class Decimal128
142142
bool isInf() const;
143143
bool isNan() const;
144144

145-
void makeKey(unsigned int* key) const;
146-
void grabKey(unsigned int* key);
145+
void makeKey(ULONG* key) const;
146+
void grabKey(ULONG* key);
147147
static ULONG getIndexKeyLength();
148148
ULONG makeIndexKey(vary* buf);
149149

@@ -170,6 +170,11 @@ class CDecimal128 : public Decimal128
170170
set(value, decSt);
171171
}
172172

173+
CDecimal128(SINT64 value, DecimalStatus decSt)
174+
{
175+
set(value, decSt, 0);
176+
}
177+
173178
CDecimal128(int value)
174179
{
175180
set(value, DecimalStatus(0), 0);

0 commit comments

Comments
 (0)