mirror of
https://github.com/Lime3DS/Lime3DS
synced 2024-12-26 09:02:44 -06:00
chore: Fix some compiler warnings. (#6578)
This commit is contained in:
parent
a1d265325a
commit
b45c7188c7
3 changed files with 12 additions and 11 deletions
|
@ -96,7 +96,7 @@ public:
|
||||||
|
|
||||||
// Insert the callback.
|
// Insert the callback.
|
||||||
stop_state_callback ret = ++m_next_callback;
|
stop_state_callback ret = ++m_next_callback;
|
||||||
m_callbacks.emplace(ret, move(f));
|
m_callbacks.emplace(ret, std::move(f));
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -154,7 +154,7 @@ private:
|
||||||
friend class stop_source;
|
friend class stop_source;
|
||||||
template <typename Callback>
|
template <typename Callback>
|
||||||
friend class stop_callback;
|
friend class stop_callback;
|
||||||
stop_token(shared_ptr<polyfill::stop_state> stop_state) : m_stop_state(move(stop_state)) {}
|
stop_token(shared_ptr<polyfill::stop_state> stop_state) : m_stop_state(std::move(stop_state)) {}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
shared_ptr<polyfill::stop_state> m_stop_state;
|
shared_ptr<polyfill::stop_state> m_stop_state;
|
||||||
|
@ -190,7 +190,7 @@ public:
|
||||||
private:
|
private:
|
||||||
friend class jthread;
|
friend class jthread;
|
||||||
explicit stop_source(shared_ptr<polyfill::stop_state> stop_state)
|
explicit stop_source(shared_ptr<polyfill::stop_state> stop_state)
|
||||||
: m_stop_state(move(stop_state)) {}
|
: m_stop_state(std::move(stop_state)) {}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
shared_ptr<polyfill::stop_state> m_stop_state;
|
shared_ptr<polyfill::stop_state> m_stop_state;
|
||||||
|
@ -210,16 +210,16 @@ public:
|
||||||
C&& cb) noexcept(is_nothrow_constructible_v<Callback, C>)
|
C&& cb) noexcept(is_nothrow_constructible_v<Callback, C>)
|
||||||
: m_stop_state(st.m_stop_state) {
|
: m_stop_state(st.m_stop_state) {
|
||||||
if (m_stop_state) {
|
if (m_stop_state) {
|
||||||
m_callback = m_stop_state->insert_callback(move(cb));
|
m_callback = m_stop_state->insert_callback(std::move(cb));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
template <typename C>
|
template <typename C>
|
||||||
requires constructible_from<Callback, C>
|
requires constructible_from<Callback, C>
|
||||||
explicit stop_callback(stop_token&& st,
|
explicit stop_callback(stop_token&& st,
|
||||||
C&& cb) noexcept(is_nothrow_constructible_v<Callback, C>)
|
C&& cb) noexcept(is_nothrow_constructible_v<Callback, C>)
|
||||||
: m_stop_state(move(st.m_stop_state)) {
|
: m_stop_state(std::move(st.m_stop_state)) {
|
||||||
if (m_stop_state) {
|
if (m_stop_state) {
|
||||||
m_callback = m_stop_state->insert_callback(move(cb));
|
m_callback = m_stop_state->insert_callback(std::move(cb));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
~stop_callback() {
|
~stop_callback() {
|
||||||
|
@ -252,7 +252,7 @@ public:
|
||||||
typename = enable_if_t<!is_same_v<remove_cvref_t<F>, jthread>>>
|
typename = enable_if_t<!is_same_v<remove_cvref_t<F>, jthread>>>
|
||||||
explicit jthread(F&& f, Args&&... args)
|
explicit jthread(F&& f, Args&&... args)
|
||||||
: m_stop_state(make_shared<polyfill::stop_state>()),
|
: m_stop_state(make_shared<polyfill::stop_state>()),
|
||||||
m_thread(make_thread(move(f), move(args)...)) {}
|
m_thread(make_thread(std::move(f), std::move(args)...)) {}
|
||||||
|
|
||||||
~jthread() {
|
~jthread() {
|
||||||
if (joinable()) {
|
if (joinable()) {
|
||||||
|
@ -309,9 +309,9 @@ private:
|
||||||
template <typename F, typename... Args>
|
template <typename F, typename... Args>
|
||||||
thread make_thread(F&& f, Args&&... args) {
|
thread make_thread(F&& f, Args&&... args) {
|
||||||
if constexpr (is_invocable_v<decay_t<F>, stop_token, decay_t<Args>...>) {
|
if constexpr (is_invocable_v<decay_t<F>, stop_token, decay_t<Args>...>) {
|
||||||
return thread(move(f), get_stop_token(), move(args)...);
|
return thread(std::move(f), get_stop_token(), std::move(args)...);
|
||||||
} else {
|
} else {
|
||||||
return thread(move(f), move(args)...);
|
return thread(std::move(f), std::move(args)...);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -110,7 +110,7 @@ void ARMul_State::Reset() {
|
||||||
Reg[13] = 0x10000000;
|
Reg[13] = 0x10000000;
|
||||||
Reg[15] = 0;
|
Reg[15] = 0;
|
||||||
|
|
||||||
Cpsr = INTBITS | SVC32MODE;
|
Cpsr = static_cast<u32>(INTBITS) | SVC32MODE;
|
||||||
Mode = SVC32MODE;
|
Mode = SVC32MODE;
|
||||||
Bank = SVCBANK;
|
Bank = SVCBANK;
|
||||||
|
|
||||||
|
|
|
@ -110,7 +110,8 @@ std::tuple<unsigned, unsigned> EmuWindow::ClipToTouchScreen(unsigned new_x, unsi
|
||||||
}
|
}
|
||||||
|
|
||||||
void EmuWindow::CreateTouchState() {
|
void EmuWindow::CreateTouchState() {
|
||||||
if (touch_state = global_touch_state.lock()) {
|
touch_state = global_touch_state.lock();
|
||||||
|
if (touch_state) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
touch_state = std::make_shared<TouchState>();
|
touch_state = std::make_shared<TouchState>();
|
||||||
|
|
Loading…
Reference in a new issue