Fix some static analysis warnings, including c-style cast
Some checks failed
Build RPCS3 / RPCS3 Linux ubuntu-24.04-arm clang (push) Waiting to run
Build RPCS3 / RPCS3 Mac Intel (push) Waiting to run
Build RPCS3 / RPCS3 Mac Apple Silicon (push) Waiting to run
Build RPCS3 / RPCS3 Windows (push) Waiting to run
Generate Translation Template / Generate Translation Template (push) Failing after 2m59s
Build RPCS3 / RPCS3 Linux ubuntu-24.04 gcc (push) Has been skipped
Build RPCS3 / RPCS3 Linux ubuntu-24.04 clang (push) Has been skipped

This commit is contained in:
Megamouse 2025-06-01 20:45:05 +02:00
parent 70faef3fdb
commit 4704c03209
9 changed files with 16 additions and 14 deletions

View file

@ -96,7 +96,7 @@ class thread_future
thread_future* prev{};
protected:
atomic_t<void(*)(thread_base*, thread_future*)> exec{};
atomic_t<void(*)(const thread_base*, thread_future*)> exec{};
atomic_t<u32> done{0};
@ -389,7 +389,7 @@ public:
: m_args(std::forward<Args>(args)...)
, m_func(std::forward<Ctx>(func))
{
thread_future::exec.raw() = +[](thread_base* tb, thread_future* tf)
thread_future::exec.raw() = +[](const thread_base* tb, thread_future* tf)
{
const auto _this = static_cast<future*>(tf);

View file

@ -84,9 +84,8 @@ public:
transactional_storage& operator=(const transactional_storage&) = delete;
transactional_storage(transactional_storage&& other)
: pool(std::move(other.pool))
{
pool = std::move(other.pool);
std::unique_lock lock_other{other.current_mutex};
const std::shared_ptr<T> other_current = other.current;
other.current = nullptr;