projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cpp-common: add `bt2s::optional`, alias of `nonstd::optional`
[babeltrace.git]
/
src
/
cpp-common
/
bt2
/
shared-object.hpp
diff --git
a/src/cpp-common/bt2/shared-object.hpp
b/src/cpp-common/bt2/shared-object.hpp
index 1ffbe8b1b9715008c71fb01c06d1af1faf90140a..8eb156523e993a16878b4586cb86085ee53d6be2 100644
(file)
--- a/
src/cpp-common/bt2/shared-object.hpp
+++ b/
src/cpp-common/bt2/shared-object.hpp
@@
-8,7
+8,7
@@
#define BABELTRACE_CPP_COMMON_BT2_SHARED_OBJECT_HPP
#include "common/assert.h"
#define BABELTRACE_CPP_COMMON_BT2_SHARED_OBJECT_HPP
#include "common/assert.h"
-#include "cpp-common/optional.hpp"
+#include "cpp-common/
bt2s/
optional.hpp"
namespace bt2 {
namespace bt2 {
@@
-252,7
+252,9
@@
public:
ObjT release() noexcept
{
BT_ASSERT_DBG(_mObj);
ObjT release() noexcept
{
BT_ASSERT_DBG(_mObj);
+
const auto obj = *_mObj;
const auto obj = *_mObj;
+
this->_reset();
return obj;
}
this->_reset();
return obj;
}
@@
-290,7
+292,7
@@
private:
}
}
}
}
-
nonstd
::optional<ObjT> _mObj;
+
bt2s
::optional<ObjT> _mObj;
};
} /* namespace bt2 */
};
} /* namespace bt2 */
This page took
0.022941 seconds
and
4
git commands to generate.