X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Fcpp-common%2Fbt2%2Ferror.hpp;h=d4dfeaac25807e75f8ee8febac5d0dc3f31dde3f;hb=HEAD;hp=b9c8c81759848917d28bcecbe5176d4f12b1b176;hpb=33f209287c8708cf14de930e4ce494e4edd054fa;p=babeltrace.git diff --git a/src/cpp-common/bt2/error.hpp b/src/cpp-common/bt2/error.hpp index b9c8c817..d4dfeaac 100644 --- a/src/cpp-common/bt2/error.hpp +++ b/src/cpp-common/bt2/error.hpp @@ -219,7 +219,7 @@ class ConstErrorIterator final private: explicit ConstErrorIterator(const UniqueConstError& error, const std::uint64_t index) noexcept : - _mError {error}, _mIndex {index} + _mError {&error}, _mIndex {index} { } @@ -257,7 +257,7 @@ public: } private: - const UniqueConstError& _mError; + const UniqueConstError *_mError; std::uint64_t _mIndex; }; @@ -321,7 +321,7 @@ private: inline ConstErrorCause ConstErrorIterator::operator*() const noexcept { - return _mError[_mIndex]; + return (*_mError)[_mIndex]; } inline UniqueConstError takeCurrentThreadError() noexcept