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

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


The following commit(s) were added to refs/heads/sampling_allocator by this 
push:
     new b261c86  use allocator
b261c86 is described below

commit b261c86fe3d3f68b90da6ebe19952b00b9495fcc
Author: AlexanderSaydakov <[email protected]>
AuthorDate: Thu Feb 4 15:02:08 2021 -0800

    use allocator
---
 sampling/include/var_opt_union_impl.hpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sampling/include/var_opt_union_impl.hpp 
b/sampling/include/var_opt_union_impl.hpp
index 223731f..db26bc0 100644
--- a/sampling/include/var_opt_union_impl.hpp
+++ b/sampling/include/var_opt_union_impl.hpp
@@ -255,7 +255,7 @@ void var_opt_union<T,S,A>::serialize(std::ostream& os) 
const {
 template<typename T, typename S, typename A>
 std::vector<uint8_t, AllocU8<A>> var_opt_union<T,S,A>::serialize(unsigned 
header_size_bytes) const {
   const size_t size = header_size_bytes + get_serialized_size_bytes();
-  std::vector<uint8_t, AllocU8<A>> bytes(size);
+  std::vector<uint8_t, AllocU8<A>> bytes(size, 0, gadget_.allocator_);
   uint8_t* ptr = bytes.data() + header_size_bytes;
 
   const bool empty = n_ == 0;


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to