You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datasketches.apache.org by al...@apache.org on 2020/11/07 03:11:57 UTC

[incubator-datasketches-cpp] 02/02: explicit cast to avoid a warning

This is an automated email from the ASF dual-hosted git repository.

alsay pushed a commit to branch req_sketch
in repository https://gitbox.apache.org/repos/asf/incubator-datasketches-cpp.git

commit bc2672aec0e61873c26deaf1cc8aa300b7a5f63a
Author: AlexanderSaydakov <Al...@users.noreply.github.com>
AuthorDate: Fri Nov 6 19:11:43 2020 -0800

    explicit cast to avoid a warning
---
 req/include/req_quantile_calculator_impl.hpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/req/include/req_quantile_calculator_impl.hpp b/req/include/req_quantile_calculator_impl.hpp
index bc143bf..fe6fcc9 100755
--- a/req/include/req_quantile_calculator_impl.hpp
+++ b/req/include/req_quantile_calculator_impl.hpp
@@ -49,7 +49,7 @@ void req_quantile_calculator<T, A>::convert_to_cummulative() {
 
 template<typename T, typename A>
 const T& req_quantile_calculator<T, A>::get_quantile(double rank) const {
-  uint64_t weight = rank * n_;
+  uint64_t weight = static_cast<uint64_t>(rank * n_);
   auto it = std::lower_bound(entries_.begin(), entries_.end(), Entry(nullptr, weight), compare_pairs_by_second());
   if (it == entries_.end()) return *(entries_[entries_.size() - 1].first);
   return *(it->first);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org