This is an automated email from the ASF dual-hosted git repository.
alsay pushed a commit to branch cleanup_warnings
in repository https://gitbox.apache.org/repos/asf/datasketches-cpp.git
The following commit(s) were added to refs/heads/cleanup_warnings by this push:
new 97778ea fixes
97778ea is described below
commit 97778ea776b3a346efe258405ea80553e531c9a4
Author: AlexanderSaydakov <[email protected]>
AuthorDate: Tue Apr 6 13:29:59 2021 -0700
fixes
---
hll/include/CouponList-internal.hpp | 4 ++--
hll/include/HllArray-internal.hpp | 2 +-
hll/include/HllUnion-internal.hpp | 2 +-
hll/test/ToFromByteArrayTest.cpp | 4 ++--
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/hll/include/CouponList-internal.hpp
b/hll/include/CouponList-internal.hpp
index 1cd9403..3bc5ea4 100644
--- a/hll/include/CouponList-internal.hpp
+++ b/hll/include/CouponList-internal.hpp
@@ -35,7 +35,7 @@ CouponList<A>::CouponList(uint8_t lgConfigK, target_hll_type
tgtHllType, hll_mod
HllSketchImpl<A>(lgConfigK, tgtHllType, mode, false),
couponCount_(0),
oooFlag_(false),
-coupons_(1ULL << (mode_ == hll_mode::LIST ? HllUtil<A>::LG_INIT_LIST_SIZE :
HllUtil<A>::LG_INIT_SET_SIZE), 0, allocator)
+coupons_(1ULL << (mode == hll_mode::LIST ? HllUtil<A>::LG_INIT_LIST_SIZE :
HllUtil<A>::LG_INIT_SET_SIZE), 0, allocator)
{}
template<typename A>
@@ -271,7 +271,7 @@ HllSketchImpl<A>* CouponList<A>::couponUpdate(uint32_t
coupon) {
if (couponAtIdx == HllUtil<A>::EMPTY) {
coupons_[i] = coupon; // the actual update
++couponCount_;
- if (couponCount_ == static_cast<int>(coupons_.size())) { // array full
+ if (couponCount_ == static_cast<uint32_t>(coupons_.size())) { // array
full
if (this->lgConfigK_ < 8) {
return promoteHeapListOrSetToHll(*this);
}
diff --git a/hll/include/HllArray-internal.hpp
b/hll/include/HllArray-internal.hpp
index a0b3fd8..ed438f5 100644
--- a/hll/include/HllArray-internal.hpp
+++ b/hll/include/HllArray-internal.hpp
@@ -576,7 +576,7 @@ void HllArray<A>::hipAndKxQIncrementalUpdate(uint8_t
oldValue, uint8_t newValue)
//In C: again-two-registers.c hhb_get_improved_linear_counting_estimate L1274
template<typename A>
double HllArray<A>::getHllBitMapEstimate() const {
- const uint32_t configK = 1 << lgConfigK_;
+ const uint32_t configK = 1 << this->lgConfigK_;
const uint32_t numUnhitBuckets = curMin_ == 0 ? numAtCurMin_ : 0;
//This will eventually go away.
diff --git a/hll/include/HllUnion-internal.hpp
b/hll/include/HllUnion-internal.hpp
index db6402f..113caf1 100644
--- a/hll/include/HllUnion-internal.hpp
+++ b/hll/include/HllUnion-internal.hpp
@@ -146,7 +146,7 @@ double hll_union_alloc<A>::get_lower_bound(uint8_t
num_std_dev) const {
template<typename A>
double hll_union_alloc<A>::get_upper_bound(uint8_t num_std_dev) const {
- return gadget.get_upper_bound(num_std_dev);
+ return gadget_.get_upper_bound(num_std_dev);
}
template<typename A>
diff --git a/hll/test/ToFromByteArrayTest.cpp b/hll/test/ToFromByteArrayTest.cpp
index 407df0d..3ea8113 100644
--- a/hll/test/ToFromByteArrayTest.cpp
+++ b/hll/test/ToFromByteArrayTest.cpp
@@ -44,11 +44,11 @@ TEST_CASE("hll to/from byte array: double serialize",
"[hll_byte_array]") {
auto ser2 = sk.serialize_updatable();
REQUIRE(ser1.size() == ser2.size());
- auto len = ser1.size();
+ size_t len = ser1.size();
uint8_t* b1 = ser1.data();
uint8_t* b2 = ser2.data();
- for (auto i = 0; i < len; ++i) {
+ for (size_t i = 0; i < len; ++i) {
REQUIRE(b2[i] == b1[i]);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]