1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-22 02:32:36 +01:00

Fix warning

This commit is contained in:
Megamouse 2024-11-16 13:05:07 +01:00
parent 2d14742a05
commit 0bb83ed5e9

View File

@ -80,7 +80,7 @@ public:
using return_t = decltype(func(std::declval<T&>())); using return_t = decltype(func(std::declval<T&>()));
for (usz i = 0; _this; i += N) while (_this)
{ {
for (usz j = 0; j < N; j++) for (usz j = 0; j < N; j++)
{ {
@ -101,17 +101,20 @@ public:
lf_array* next = m_next; lf_array* next = m_next;
if (!next && !std::is_void_v<return_t> && !is_finite) if constexpr (!std::is_void_v<return_t>)
{ {
for (auto _new = new lf_array, ptr = _this; ptr;) if (!next && !is_finite)
{ {
// Install the pointer. If failed, go deeper. for (auto _new = new lf_array, ptr = _this; ptr;)
ptr = ptr->m_next.compare_and_swap(nullptr, _new);
if (!next)
{ {
// Determine the next pointer (if null then the new memory has been installed) // Install the pointer. If failed, go deeper.
next = ptr ? ptr : _new; ptr = ptr->m_next.compare_and_swap(nullptr, _new);
if (!next)
{
// Determine the next pointer (if null then the new memory has been installed)
next = ptr ? ptr : _new;
}
} }
} }
} }