From b0efd481c7bbdcdb656c830da05094044ab6f90d Mon Sep 17 00:00:00 2001 From: Mikhail Kolmogorov Date: Fri, 24 May 2024 09:43:28 -0400 Subject: [PATCH] compliation fix for macos clang --- src/common/bfcontainer.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/common/bfcontainer.h b/src/common/bfcontainer.h index 4b2582f6d..dc3a8e140 100644 --- a/src/common/bfcontainer.h +++ b/src/common/bfcontainer.h @@ -177,7 +177,7 @@ class BFContainer return *this += -n; } - BFIterator operator+(difference_type n) + BFIterator operator+(difference_type n) const { auto tmp = *this; return tmp += n; @@ -188,13 +188,13 @@ class BFContainer return rhs + lhs; } - BFIterator operator-(difference_type n) + BFIterator operator-(difference_type n) const { auto tmp = *this; return tmp -= n; } - difference_type operator-(const BFIterator& rhs) + difference_type operator-(const BFIterator& rhs) const { return difference_type(ChunkSize) * (_map - rhs._map - 1) + (_chunkCur - _chunkStart) + @@ -239,8 +239,8 @@ class BFContainer T& operator[](difference_type n) {return *(*this += n);} - T& operator*() {return *_chunkCur;} - T* operator->() {return _chunkCur;} + T& operator*() const {return *_chunkCur;} + T* operator->() const {return _chunkCur;} bool operator==(const BFIterator& rhs) const {