From a9b1f9f0838a63930c041795ac0b22fd54c7c74e Mon Sep 17 00:00:00 2001 From: klemens-morgenstern Date: Sat, 18 Jun 2016 19:20:22 +0200 Subject: [PATCH 1/2] more cleanup --- include/boost/histogram/detail/nstore.hpp | 4 ++-- include/boost/histogram/histogram.hpp | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/include/boost/histogram/detail/nstore.hpp b/include/boost/histogram/detail/nstore.hpp index d077b898..4e2b5e6d 100644 --- a/include/boost/histogram/detail/nstore.hpp +++ b/include/boost/histogram/detail/nstore.hpp @@ -139,8 +139,8 @@ private: template bool add_impl_(size_type i, const uint64_t & oi) { - T& b = ((T*)buffer_)[i]; - if (T(std::numeric_limits::max() - b) >= oi) { + T& b = static_cast(buffer_)[i]; + if (static_cast(std::numeric_limits::max() - b) >= oi) { b += oi; return true; } else grow(); /* and fall through */ diff --git a/include/boost/histogram/histogram.hpp b/include/boost/histogram/histogram.hpp index 6c7b9ef5..aaa251b4 100644 --- a/include/boost/histogram/histogram.hpp +++ b/include/boost/histogram/histogram.hpp @@ -11,8 +11,6 @@ #include #include #include -#include -#include #include #include #include From 72734c02687cb71fef8efaf744a2304ac8f0e351 Mon Sep 17 00:00:00 2001 From: klemens-morgenstern Date: Sat, 18 Jun 2016 19:25:03 +0200 Subject: [PATCH 2/2] small fix --- include/boost/histogram/axis.hpp | 2 +- include/boost/histogram/histogram.hpp | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/include/boost/histogram/axis.hpp b/include/boost/histogram/axis.hpp index 976f4fdd..f8ba4e41 100644 --- a/include/boost/histogram/axis.hpp +++ b/include/boost/histogram/axis.hpp @@ -194,7 +194,7 @@ public: const std::string& label = std::string(), bool uoflow = true); - integer_axis() {} + integer_axis() : min_(0) {} integer_axis(const integer_axis&); integer_axis& operator=(const integer_axis&); diff --git a/include/boost/histogram/histogram.hpp b/include/boost/histogram/histogram.hpp index aaa251b4..02fe2992 100644 --- a/include/boost/histogram/histogram.hpp +++ b/include/boost/histogram/histogram.hpp @@ -173,7 +173,6 @@ BOOST_PP_REPEAT_FROM_TO(1, BOOST_HISTOGRAM_AXIS_LIMIT, BOOST_HISTOGRAM_VARIANCE, private: detail::nstore data_; - friend class serialization::access; template friend void serialize(Archive& ar, histogram & h, unsigned version); };