summaryrefslogtreecommitdiff
path: root/asl/types/function.hpp
diff options
context:
space:
mode:
authorSteven Le Rouzic <steven.lerouzic@gmail.com>2025-03-22 01:21:56 +0100
committerSteven Le Rouzic <steven.lerouzic@gmail.com>2025-03-22 19:24:40 +0100
commit781877bd26ed7ab01ae6cf952bf4691641593ed2 (patch)
tree1f64c53d7fdada9d751fb88c4fa35fbf03305221 /asl/types/function.hpp
parentc692909ff332de6f2e32db844458ccd03a080e53 (diff)
Add function_ref
Diffstat (limited to 'asl/types/function.hpp')
-rw-r--r--asl/types/function.hpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/asl/types/function.hpp b/asl/types/function.hpp
index 6460711..40387ba 100644
--- a/asl/types/function.hpp
+++ b/asl/types/function.hpp
@@ -196,7 +196,7 @@ public:
{
if (m_op != nullptr)
{
- (*m_op)(
+ m_op(
&m_storage,
const_cast<function_detail::Storage*>(&other.m_storage), // NOLINT(*-const-cast)
function_detail::FunctionOp::kCopyFromOtherToThisUninit);
@@ -209,7 +209,7 @@ public:
{
if (m_op != nullptr)
{
- (*m_op)(
+ m_op(
&m_storage,
&other.m_storage,
function_detail::FunctionOp::kMoveFromOtherToThisUninit);
@@ -230,7 +230,7 @@ public:
m_invoke = other.m_invoke;
m_op = other.m_op;
- (*m_op)(
+ m_op(
&m_storage,
const_cast<function_detail::Storage*>(&other.m_storage), // NOLINT(*-const-cast)
function_detail::FunctionOp::kCopyFromOtherToThisUninit);
@@ -247,7 +247,7 @@ public:
m_invoke = asl::exchange(other.m_invoke, nullptr);
m_op = asl::exchange(other.m_op, nullptr);
- (*m_op)(
+ m_op(
&m_storage,
&other.m_storage,
function_detail::FunctionOp::kMoveFromOtherToThisUninit);
@@ -277,7 +277,7 @@ public:
constexpr R operator()(Args... args) const
{
ASL_ASSERT(m_invoke);
- return (*m_invoke)(args..., m_storage);
+ return m_invoke(args..., m_storage);
}
};