diff options
Diffstat (limited to 'src/KingSystem/ActorSystem/actActorLinkConstDataAccess.h')
| -rw-r--r-- | src/KingSystem/ActorSystem/actActorLinkConstDataAccess.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/KingSystem/ActorSystem/actActorLinkConstDataAccess.h b/src/KingSystem/ActorSystem/actActorLinkConstDataAccess.h index 7a58a5cf..9bc70714 100644 --- a/src/KingSystem/ActorSystem/actActorLinkConstDataAccess.h +++ b/src/KingSystem/ActorSystem/actActorLinkConstDataAccess.h @@ -17,6 +17,17 @@ public: /// Destructor that automatically releases any acquired BaseProc. ~ActorLinkConstDataAccess(); + ActorLinkConstDataAccess(const ActorLinkConstDataAccess&) = delete; + ActorLinkConstDataAccess& operator=(const ActorLinkConstDataAccess&) = delete; + ActorLinkConstDataAccess(ActorLinkConstDataAccess&& other) noexcept { + *this = std::move(other); + } + ActorLinkConstDataAccess& operator=(ActorLinkConstDataAccess&& other) noexcept { + std::swap(mAcquired, other.mAcquired); + std::swap(mProc, other.mProc); + return *this; + } + /// Acquire a BaseProc. This increments its reference count. /// If an actor was already acquired, it is released. bool acquire(BaseProc* proc); |
