Skip to content

Commit

Permalink
Fixed MSVC build and some warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
hvlad committed Apr 25, 2017
1 parent 0a95f34 commit 4170686
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
12 changes: 6 additions & 6 deletions src/common/DecFloat.cpp
Expand Up @@ -133,7 +133,7 @@ unsigned digits(const unsigned pMax, unsigned char* const coeff, int& exp)
return 0;
}

void make(unsigned int* key,
void make(ULONG* key,
const unsigned pMax, const int bias, const unsigned decSize,
unsigned char* coeff, int sign, int exp)
{
Expand Down Expand Up @@ -165,7 +165,7 @@ void make(unsigned int* key,
}
}

void grab(unsigned int* key,
void grab(ULONG* key,
const unsigned pMax, const int bias, const unsigned decSize,
unsigned char* bcd, int& sign, int& exp)
{
Expand Down Expand Up @@ -363,7 +363,7 @@ Decimal64 Decimal64::neg() const
return rc;
}

void Decimal64::makeKey(unsigned int* key) const
void Decimal64::makeKey(ULONG* key) const
{
unsigned char coeff[DECDOUBLE_Pmax];
int sign = decDoubleGetCoefficient(&dec, coeff);
Expand All @@ -372,7 +372,7 @@ void Decimal64::makeKey(unsigned int* key) const
make(key, DECDOUBLE_Pmax, DECDOUBLE_Bias, sizeof(dec), coeff, sign, exp);
}

void Decimal64::grabKey(unsigned int* key)
void Decimal64::grabKey(ULONG* key)
{
int exp, sign;
unsigned char bcd[DECDOUBLE_Pmax];
Expand Down Expand Up @@ -762,7 +762,7 @@ Decimal128 Decimal128::log10(DecimalStatus decSt) const
return rc;
}

void Decimal128::makeKey(unsigned int* key) const
void Decimal128::makeKey(ULONG* key) const
{
unsigned char coeff[DECQUAD_Pmax];
int sign = decQuadGetCoefficient(&dec, coeff);
Expand All @@ -771,7 +771,7 @@ void Decimal128::makeKey(unsigned int* key) const
make(key, DECQUAD_Pmax, DECQUAD_Bias, sizeof(dec), coeff, sign, exp);
}

void Decimal128::grabKey(unsigned int* key)
void Decimal128::grabKey(ULONG* key)
{
int exp, sign;
unsigned char bcd[DECQUAD_Pmax];
Expand Down
13 changes: 9 additions & 4 deletions src/common/DecFloat.h
Expand Up @@ -86,8 +86,8 @@ class Decimal64
bool isInf() const;
bool isNan() const;

void makeKey(unsigned int* key) const;
void grabKey(unsigned int* key);
void makeKey(ULONG* key) const;
void grabKey(ULONG* key);

Decimal64 quantize(DecimalStatus decSt, Decimal64 op2) const;
Decimal64 normalize(DecimalStatus decSt) const;
Expand Down Expand Up @@ -142,8 +142,8 @@ class Decimal128
bool isInf() const;
bool isNan() const;

void makeKey(unsigned int* key) const;
void grabKey(unsigned int* key);
void makeKey(ULONG* key) const;
void grabKey(ULONG* key);
static ULONG getIndexKeyLength();
ULONG makeIndexKey(vary* buf);

Expand All @@ -170,6 +170,11 @@ class CDecimal128 : public Decimal128
set(value, decSt);
}

CDecimal128(SINT64 value, DecimalStatus decSt)
{
set(value, decSt, 0);
}

CDecimal128(int value)
{
set(value, DecimalStatus(0), 0);
Expand Down

0 comments on commit 4170686

Please sign in to comment.