Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: userver/core/src/utils/statistics/impl/histogram_view_utils.hpp
- IDEA additional info:
- Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
- <+>UTF-8
- ===================================================================
- diff --git a/userver/core/src/utils/statistics/impl/histogram_view_utils.hpp b/userver/core/src/utils/statistics/impl/histogram_view_utils.hpp
- --- a/userver/core/src/utils/statistics/impl/histogram_view_utils.hpp (revision 74036559a71b8c0f7651f0638abb8e64259c080d)
- +++ b/userver/core/src/utils/statistics/impl/histogram_view_utils.hpp (date 1706007217335)
- @@ -32,10 +32,9 @@
- template <typename AnyHistogramView>
- static auto Bounds(AnyHistogramView view) noexcept {
- - const auto bound_ref_getter = [](auto&& bucket) -> auto& {
- - return bucket.upper_bound.bound;
- - };
- - return Buckets(view) | boost::adaptors::transformed(bound_ref_getter);
- + return Buckets(view) |
- + boost::adaptors::transformed(
- + [](const Bucket& bucket) { return bucket.upper_bound.bound; });
- }
- template <typename AnyHistogramView>
- @@ -97,7 +96,10 @@
- UINVARIANT(*upper_bounds.begin(), "Histogram bounds must be positive");
- }
- buckets_[0].upper_bound.size = std::size(upper_bounds);
- - boost::copy(upper_bounds, Access::Bounds(*this).begin());
- + for (auto [bucket, bound] :
- + boost::combine(Access::Buckets(*this), upper_bounds)) {
- + bucket.upper_bound.bound = bound;
- + }
- }
- // Atomic for 'other', non-atomic for 'this'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement