mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-08-11 11:47:41 -05:00
Add GUARD_LOADING_AND_LOCK
Helper macro to reduce repetition
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user