From cd8a842cdcc2d903372e7169b346ec8f837eebe5 Mon Sep 17 00:00:00 2001 From: Luis Antonio Obis Aparicio Date: Tue, 26 Sep 2023 11:04:04 +0200 Subject: [PATCH 1/2] fix error number one --- source/framework/core/inc/TRestHits.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source/framework/core/inc/TRestHits.h b/source/framework/core/inc/TRestHits.h index 6b406c4db..07cfc2d34 100644 --- a/source/framework/core/inc/TRestHits.h +++ b/source/framework/core/inc/TRestHits.h @@ -197,8 +197,12 @@ class TRestHits { using iterator_category = std::random_access_iterator_tag; using value_type = TRestHits_Iterator; using difference_type = int; - using pointer = void; - using reference = void; + using pointer = float*; + using reference = float&; + + reference operator*() { + return isAccessor ? x() : fHits->fX[index]; // Replace with the appropriate member access + } private: int maxIndex = 0; From 7d83a61ca4ebe23592b05a30b052b54e6ddf5bd8 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 26 Sep 2023 09:06:35 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- source/framework/core/inc/TRestHits.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/framework/core/inc/TRestHits.h b/source/framework/core/inc/TRestHits.h index 07cfc2d34..c547e7783 100644 --- a/source/framework/core/inc/TRestHits.h +++ b/source/framework/core/inc/TRestHits.h @@ -201,7 +201,7 @@ class TRestHits { using reference = float&; reference operator*() { - return isAccessor ? x() : fHits->fX[index]; // Replace with the appropriate member access + return isAccessor ? x() : fHits->fX[index]; // Replace with the appropriate member access } private: