cpp-common/bt2: make `UniqueConstError::_mError` a pointer
[babeltrace.git] / src / cpp-common / bt2 / error.hpp
index b9c8c81759848917d28bcecbe5176d4f12b1b176..d4dfeaac25807e75f8ee8febac5d0dc3f31dde3f 100644 (file)
@@ -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
This page took 0.023848 seconds and 4 git commands to generate.