[ox] Cleanup String/StringView conversions, MallocaPtr
This commit is contained in:
10
deps/ox/src/ox/event/signal.hpp
vendored
10
deps/ox/src/ox/event/signal.hpp
vendored
@@ -245,7 +245,7 @@ class Signal<Error(Args...)> {
|
||||
}
|
||||
|
||||
Error call(Args... args) noexcept final {
|
||||
return f(args...);
|
||||
return f(ox::forward<Args>(args)...);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -260,7 +260,7 @@ class Signal<Error(Args...)> {
|
||||
}
|
||||
|
||||
Error call(Args... args) noexcept final {
|
||||
return (m_receiver->*(m_methodPtr))(args...);
|
||||
return (m_receiver->*(m_methodPtr))(ox::forward<Args>(args)...);
|
||||
}
|
||||
|
||||
void cleanup(Signal *signal) noexcept final {
|
||||
@@ -286,7 +286,7 @@ class Signal<Error(Args...)> {
|
||||
}
|
||||
|
||||
Error call(Args... args) noexcept final {
|
||||
return (m_receiver->*(m_methodPtr))(args...);
|
||||
return (m_receiver->*(m_methodPtr))(ox::forward<Args>(args)...);
|
||||
}
|
||||
|
||||
void cleanup(Signal*) noexcept final {
|
||||
@@ -391,14 +391,14 @@ Error Signal<Error(Args...)>::disconnectObject(const void *receiver) const noexc
|
||||
template<class... Args>
|
||||
void Signal<Error(Args...)>::emit(Args... args) const noexcept {
|
||||
for (auto &f : m_slots) {
|
||||
oxIgnoreError(f->call(args...));
|
||||
oxIgnoreError(f->call(ox::forward<Args>(args)...));
|
||||
}
|
||||
}
|
||||
|
||||
template<class... Args>
|
||||
Error Signal<Error(Args...)>::emitCheckError(Args... args) const noexcept {
|
||||
for (auto &f : m_slots) {
|
||||
oxReturnError(f->call(args...));
|
||||
oxReturnError(f->call(ox::forward<Args>(args)...));
|
||||
}
|
||||
return OxError(0);
|
||||
}
|
||||
|
Reference in New Issue
Block a user