small collection of fixes

This commit is contained in:
p01arst0rm 2021-04-14 20:44:37 +01:00 committed by Ivan
parent a16cc3ac8a
commit c9d2aed286
3 changed files with 12 additions and 25 deletions

View file

@ -1053,15 +1053,8 @@ namespace stx
ensure(is_same_ptr_test<T, U>(cmp.m_ptr));
shared_type old = cmp;
if (compare_exchange(old, std::move(exch)))
{
return old;
}
else
{
return old;
}
static_cast<void>(compare_exchange(old, std::move(exch)));
return old;
}
// More lightweight than compare_exchange
@ -1114,15 +1107,8 @@ namespace stx
ensure(is_same_ptr_test<T, U>(cmp.m_ptr));
shared_type old = cmp;
if (compare_exchange(old, std::move(exch)))
{
return old;
}
else
{
return old;
}
static_cast<void>(compare_exchange(old, std::move(exch)));
return old;
}
// Supplementary