mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-04 14:01:17 +12:00
nn_olv: More work on post API
This commit is contained in:
parent
67819a68d9
commit
0d96255bae
12 changed files with 655 additions and 207 deletions
|
@ -485,6 +485,14 @@ bool future_is_ready(std::future<T>& f)
|
|||
#endif
|
||||
}
|
||||
|
||||
// replace with std::scope_exit once available
|
||||
struct scope_exit
|
||||
{
|
||||
std::function<void()> f_;
|
||||
explicit scope_exit(std::function<void()> f) noexcept : f_(std::move(f)) {}
|
||||
~scope_exit() { if (f_) f_(); }
|
||||
};
|
||||
|
||||
// helper function to cast raw pointers to std::atomic
|
||||
// this is technically not legal but works on most platforms as long as alignment restrictions are met and the implementation of atomic doesnt come with additional members
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue