[TD-225]fix compiler error.
This commit is contained in:
parent
c04da26c30
commit
0d98e24801
|
@ -119,7 +119,7 @@ int32_t tBucketIntHash(tMemBucket *pBucket, const void *value) {
|
||||||
// divide the value range into 1024 buckets
|
// divide the value range into 1024 buckets
|
||||||
uint64_t span = pBucket->range.i64MaxVal - pBucket->range.i64MinVal;
|
uint64_t span = pBucket->range.i64MaxVal - pBucket->range.i64MinVal;
|
||||||
if (span < pBucket->numOfSlots) {
|
if (span < pBucket->numOfSlots) {
|
||||||
int32_t delta = v - pBucket->range.i64MinVal;
|
int64_t delta = v - pBucket->range.i64MinVal;
|
||||||
index = (delta % pBucket->numOfSlots);
|
index = (delta % pBucket->numOfSlots);
|
||||||
} else {
|
} else {
|
||||||
double slotSpan = (double)span / pBucket->numOfSlots;
|
double slotSpan = (double)span / pBucket->numOfSlots;
|
||||||
|
@ -141,8 +141,8 @@ int32_t tBucketUintHash(tMemBucket *pBucket, const void *value) {
|
||||||
// divide the value range into 1024 buckets
|
// divide the value range into 1024 buckets
|
||||||
uint64_t span = pBucket->range.u64MaxVal - pBucket->range.u64MinVal;
|
uint64_t span = pBucket->range.u64MaxVal - pBucket->range.u64MinVal;
|
||||||
if (span < pBucket->numOfSlots) {
|
if (span < pBucket->numOfSlots) {
|
||||||
int32_t delta = v - pBucket->range.u64MinVal;
|
int64_t delta = v - pBucket->range.u64MinVal;
|
||||||
index = (delta % pBucket->numOfSlots);
|
index = (int32_t) (delta % pBucket->numOfSlots);
|
||||||
} else {
|
} else {
|
||||||
double slotSpan = (double)span / pBucket->numOfSlots;
|
double slotSpan = (double)span / pBucket->numOfSlots;
|
||||||
index = (int32_t)((v - pBucket->range.u64MinVal) / slotSpan);
|
index = (int32_t)((v - pBucket->range.u64MinVal) / slotSpan);
|
||||||
|
@ -515,4 +515,4 @@ bool isIdenticalData(tMemBucket *pMemBucket, int32_t index) {
|
||||||
} else {
|
} else {
|
||||||
return pSeg->range.i64MinVal == pSeg->range.i64MaxVal;
|
return pSeg->range.i64MinVal == pSeg->range.i64MaxVal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue