From 4e8ff433c6114bf3165d79af7270f2f7e473500b Mon Sep 17 00:00:00 2001 From: John Wellbelove Date: Tue, 27 Apr 2021 18:17:35 +0100 Subject: [PATCH] Fixed histogram end() and cend() values. --- include/etl/histogram.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/etl/histogram.h b/include/etl/histogram.h index 83167612..f2d0eefa 100644 --- a/include/etl/histogram.h +++ b/include/etl/histogram.h @@ -21,6 +21,8 @@ namespace etl { public: + ETL_STATIC_ASSERT(etl::is_integral::value, "Only integral count allowed"); + static ETL_CONSTANT size_t Max_Size = Max_Size_; typedef typename etl::array::const_iterator const_iterator; @@ -46,7 +48,7 @@ namespace etl //********************************* const_iterator end() const { - return accumulator.begin(); + return accumulator.end(); } //********************************* @@ -54,7 +56,7 @@ namespace etl //********************************* const_iterator cend() const { - return accumulator.cbegin(); + return accumulator.cend(); } //*********************************