mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-03-21 17:34:57 -05:00
Add GUARD_LOADING_AND_LOCK
Helper macro to reduce repetition
This commit is contained in:
parent
286f781f4d
commit
235b31fccc
|
|
@ -5,6 +5,13 @@
|
|||
|
||||
namespace advss {
|
||||
|
||||
// Helper used in macro segment edit widgets
|
||||
#define GUARD_LOADING_AND_LOCK() \
|
||||
if (_loading || !_entryData) { \
|
||||
return; \
|
||||
} \
|
||||
auto lock = LockContext();
|
||||
|
||||
[[nodiscard]] EXPORT std::mutex *GetMutex();
|
||||
[[nodiscard]] EXPORT std::lock_guard<std::mutex> LockContext();
|
||||
[[nodiscard]] EXPORT std::unique_lock<std::mutex> *GetLoopLock();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user