From 424b3cd127b6adadcc22f1104f2a68b74098da05 Mon Sep 17 00:00:00 2001 From: Stephen Seo Date: Sat, 22 Jul 2023 19:07:32 +0900 Subject: [PATCH] Minor refactorings --- src/CXX11_shared_spin_lock.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/CXX11_shared_spin_lock.cpp b/src/CXX11_shared_spin_lock.cpp index 7778155..e9fb27c 100644 --- a/src/CXX11_shared_spin_lock.cpp +++ b/src/CXX11_shared_spin_lock.cpp @@ -39,7 +39,7 @@ UDPC::LockObj UDPC::SharedSpinLock::try_spin_read_lock() { ++read; return LockObj(selfWeakPtr, Badge{}); } - return LockObj(Badge{}); + return LockObj{}; } void UDPC::SharedSpinLock::read_unlock(UDPC::Badge &&badge) { @@ -68,7 +68,7 @@ UDPC::LockObj UDPC::SharedSpinLock::try_spin_write_lock() { write = true; return LockObj(selfWeakPtr, Badge{}); } - return LockObj(Badge{}); + return LockObj{}; } void UDPC::SharedSpinLock::write_unlock(UDPC::Badge &&badge) { @@ -92,7 +92,7 @@ UDPC::LockObj UDPC::SharedSpinLock::trade_write_for_read_lock(UDPC::LockO } } } else { - return LockObj(Badge{}); + return LockObj{}; } } @@ -107,7 +107,7 @@ UDPC::LockObj UDPC::SharedSpinLock::try_trade_write_for_read_lock(UDPC::L return LockObj(selfWeakPtr, Badge{}); } } - return LockObj(Badge{}); + return LockObj{}; } UDPC::LockObj UDPC::SharedSpinLock::trade_read_for_write_lock(UDPC::LockObj &lockObj) { @@ -123,7 +123,7 @@ UDPC::LockObj UDPC::SharedSpinLock::trade_read_for_write_lock(UDPC::LockOb } } } else { - return LockObj(Badge{}); + return LockObj{}; } } @@ -138,5 +138,5 @@ UDPC::LockObj UDPC::SharedSpinLock::try_trade_read_for_write_lock(UDPC::Lo return LockObj(selfWeakPtr, Badge{}); } } - return LockObj(Badge{}); + return LockObj{}; }