Skip to content
Permalink
Browse files
fixed conversion
  • Loading branch information
AlexanderSaydakov committed Oct 13, 2021
1 parent 559343b commit f933c666b3587c631d2c9db1fa7f8b6d50ed8271
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 11 deletions.
@@ -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>
@@ -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
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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
@@ -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

0 comments on commit f933c66

Please sign in to comment.