mirror of
https://github.com/yuzu-mirror/yuzu
synced 2024-12-21 00:23:09 +00:00
common: common_funcs: Add helper macros for non-copyable and non-moveable.
- Useful for scenarios where we do not want to inherit from NonCopyable.
This commit is contained in:
parent
260b841dc3
commit
b99fc70191
1 changed files with 8 additions and 0 deletions
|
@ -108,6 +108,14 @@ __declspec(dllimport) void __stdcall DebugBreak(void);
|
||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define NON_COPYABLE(cls) \
|
||||||
|
cls(const cls&) = delete; \
|
||||||
|
cls& operator=(const cls&) = delete
|
||||||
|
|
||||||
|
#define NON_MOVEABLE(cls) \
|
||||||
|
cls(cls&&) = delete; \
|
||||||
|
cls& operator=(cls&&) = delete
|
||||||
|
|
||||||
#define R_SUCCEEDED(res) (res.IsSuccess())
|
#define R_SUCCEEDED(res) (res.IsSuccess())
|
||||||
|
|
||||||
/// Evaluates an expression that returns a result, and returns the result if it would fail.
|
/// Evaluates an expression that returns a result, and returns the result if it would fail.
|
||||||
|
|
Loading…
Reference in a new issue