This is an automated email from the ASF dual-hosted git repository.
alsay pushed a commit to branch fix_allocation_in_to_string
in repository https://gitbox.apache.org/repos/asf/datasketches-cpp.git
The following commit(s) were added to refs/heads/fix_allocation_in_to_string by
this push:
new f933c66 fixed conversion
f933c66 is described below
commit f933c666b3587c631d2c9db1fa7f8b6d50ed8271
Author: AlexanderSaydakov <[email protected]>
AuthorDate: Wed Oct 13 14:53:35 2021 -0700
fixed conversion
---
cpc/include/cpc_sketch_impl.hpp | 2 +-
fi/include/frequent_items_sketch_impl.hpp | 2 +-
hll/include/HllSketch-internal.hpp | 2 +-
kll/include/kll_sketch_impl.hpp | 2 +-
req/include/req_sketch_impl.hpp | 2 +-
sampling/include/var_opt_sketch_impl.hpp | 6 +++---
sampling/include/var_opt_union_impl.hpp | 2 +-
theta/include/theta_sketch_impl.hpp | 2 +-
tuple/include/tuple_sketch_impl.hpp | 2 +-
9 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/cpc/include/cpc_sketch_impl.hpp b/cpc/include/cpc_sketch_impl.hpp
index f0e14ca..0881b70 100644
--- a/cpc/include/cpc_sketch_impl.hpp
+++ b/cpc/include/cpc_sketch_impl.hpp
@@ -401,7 +401,7 @@ string<A> cpc_sketch_alloc<A>::to_string() const {
os << " window offset : " << std::to_string(window_offset) << std::endl;
}
os << "### End sketch summary" << std::endl;
- return string<A>(os.str(), sliding_window.get_allocator());
+ return string<A>(os.str().c_str(), sliding_window.get_allocator());
}
template<typename A>
diff --git a/fi/include/frequent_items_sketch_impl.hpp
b/fi/include/frequent_items_sketch_impl.hpp
index f9b984d..602dfc6 100644
--- a/fi/include/frequent_items_sketch_impl.hpp
+++ b/fi/include/frequent_items_sketch_impl.hpp
@@ -446,7 +446,7 @@ string<A> frequent_items_sketch<T, W, H, E, S,
A>::to_string(bool print_items) c
}
os << "### End items" << std::endl;
}
- return string<A>(os.str(), map.get_allocator());
+ return string<A>(os.str().c_str(), map.get_allocator());
}
// version for integral signed type
diff --git a/hll/include/HllSketch-internal.hpp
b/hll/include/HllSketch-internal.hpp
index 16e00e2..f3b99c1 100644
--- a/hll/include/HllSketch-internal.hpp
+++ b/hll/include/HllSketch-internal.hpp
@@ -340,7 +340,7 @@ string<A> hll_sketch_alloc<A>::to_string(const bool summary,
}
}
- return string<A>(os.str(), sketch_impl->getAllocator());
+ return string<A>(os.str().c_str(), sketch_impl->getAllocator());
}
template<typename A>
diff --git a/kll/include/kll_sketch_impl.hpp b/kll/include/kll_sketch_impl.hpp
index b835857..e346549 100644
--- a/kll/include/kll_sketch_impl.hpp
+++ b/kll/include/kll_sketch_impl.hpp
@@ -1071,7 +1071,7 @@ string<A> kll_sketch<T, C, S, A>::to_string(bool
print_levels, bool print_items)
}
os << "### End sketch data" << std::endl;
}
- return string<A>(os.str(), allocator_);
+ return string<A>(os.str().c_str(), allocator_);
}
template <typename T, typename C, typename S, typename A>
diff --git a/req/include/req_sketch_impl.hpp b/req/include/req_sketch_impl.hpp
index c7a2f81..7648546 100755
--- a/req/include/req_sketch_impl.hpp
+++ b/req/include/req_sketch_impl.hpp
@@ -695,7 +695,7 @@ string<A> req_sketch<T, C, S, A>::to_string(bool
print_levels, bool print_items)
}
os << "### End sketch data" << std::endl;
}
- return string<A>(os.str(), allocator_);
+ return string<A>(os.str().c_str(), allocator_);
}
template<typename T, typename C, typename S, typename A>
diff --git a/sampling/include/var_opt_sketch_impl.hpp
b/sampling/include/var_opt_sketch_impl.hpp
index 484e699..b2de71f 100644
--- a/sampling/include/var_opt_sketch_impl.hpp
+++ b/sampling/include/var_opt_sketch_impl.hpp
@@ -742,7 +742,7 @@ string<A> var_opt_sketch<T,S,A>::to_string() const {
os << " Current size : " << curr_items_alloc_ << std::endl;
os << " Resize factor: " << (1 << rf_) << std::endl;
os << "### END SKETCH SUMMARY" << std::endl;
- return string<A>(os.str(), allocator_);
+ return string<A>(os.str().c_str(), allocator_);
}
template<typename T, typename S, typename A>
@@ -756,7 +756,7 @@ string<A> var_opt_sketch<T,S,A>::items_to_string() const {
os << idx << ": " << record.first << "\twt = " << record.second <<
std::endl;
++idx;
}
- return string<A>(os.str(), allocator_);
+ return string<A>(os.str().c_str(), allocator_);
}
template<typename T, typename S, typename A>
@@ -780,7 +780,7 @@ string<A> var_opt_sketch<T,S,A>::items_to_string(bool
print_gap) const {
++display_idx;
}
}
- return string<A>(os.str(), allocator_);
+ return string<A>(os.str().c_str(), allocator_);
}
template<typename T, typename S, typename A>
diff --git a/sampling/include/var_opt_union_impl.hpp
b/sampling/include/var_opt_union_impl.hpp
index b9274e7..8eafbec 100644
--- a/sampling/include/var_opt_union_impl.hpp
+++ b/sampling/include/var_opt_union_impl.hpp
@@ -304,7 +304,7 @@ string<A> var_opt_union<T,S,A>::to_string() const {
os << " Gadget Summary:" << std::endl;
os << gadget_.to_string();
os << "### END VarOpt Union SUMMARY" << std::endl;
- return string<A>(os.str(), gadget_.allocator_);
+ return string<A>(os.str().c_str(), gadget_.allocator_);
}
template<typename T, typename S, typename A>
diff --git a/theta/include/theta_sketch_impl.hpp
b/theta/include/theta_sketch_impl.hpp
index 636df3d..ab96de8 100644
--- a/theta/include/theta_sketch_impl.hpp
+++ b/theta/include/theta_sketch_impl.hpp
@@ -82,7 +82,7 @@ string<A> theta_sketch_alloc<A>::to_string(bool detail) const
{
}
os << "### End retained entries" << std::endl;
}
- return string<A>(os.str(), get_allocator());
+ return string<A>(os.str().c_str(), get_allocator());
}
// update sketch
diff --git a/tuple/include/tuple_sketch_impl.hpp
b/tuple/include/tuple_sketch_impl.hpp
index f63697a..bd14ca7 100644
--- a/tuple/include/tuple_sketch_impl.hpp
+++ b/tuple/include/tuple_sketch_impl.hpp
@@ -76,7 +76,7 @@ string<A> tuple_sketch<S, A>::to_string(bool detail) const {
}
os << "### End retained entries" << std::endl;
}
- return string<A>(os.str(), get_allocator());
+ return string<A>(os.str().c_str(), get_allocator());
}
// update sketch
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]