diff options
| author | Léo Lam <leo@leolam.fr> | 2020-08-20 18:47:59 +0200 |
|---|---|---|
| committer | Léo Lam <leo@leolam.fr> | 2020-08-20 18:47:59 +0200 |
| commit | efdedd1d888cc9b501166d48c6ca26bb242a5d23 (patch) | |
| tree | e75c2fe314cb9657c4517472c72fd4f06a230e79 /src | |
| parent | afde5b27753162e187cffc6ec765099bd0767459 (diff) | |
ksys/act: Fix const-correctness for BaseProcLink::getProc
Diffstat (limited to 'src')
| -rw-r--r-- | src/KingSystem/ActorSystem/actBaseProcLink.cpp | 4 | ||||
| -rw-r--r-- | src/KingSystem/ActorSystem/actBaseProcLink.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/KingSystem/ActorSystem/actBaseProcLink.cpp b/src/KingSystem/ActorSystem/actBaseProcLink.cpp index a99960d9..677e1aaf 100644 --- a/src/KingSystem/ActorSystem/actBaseProcLink.cpp +++ b/src/KingSystem/ActorSystem/actBaseProcLink.cpp @@ -39,7 +39,7 @@ bool BaseProcLink::hasProcById(BaseProc* proc) const { return proc != nullptr & mId != cInvalidId && mId == proc->getId(); } -BaseProc* BaseProcLink::getProc(ActorLinkConstDataAccess* accessor, BaseProc* other_proc) { +BaseProc* BaseProcLink::getProc(ActorLinkConstDataAccess* accessor, BaseProc* other_proc) const { return getProcInContext([&](BaseProc* proc) -> BaseProc* { if (proc && acquireProc(accessor, proc, "frm::BaseProcLink") && BaseProcMgr::instance()->isAccessingProcSafe(proc, other_proc)) { @@ -49,7 +49,7 @@ BaseProc* BaseProcLink::getProc(ActorLinkConstDataAccess* accessor, BaseProc* ot }); } -BaseProc* BaseProcLink::getProc(ActorLinkConstDataAccess* accessor) { +BaseProc* BaseProcLink::getProc(ActorLinkConstDataAccess* accessor) const { return getProcInContext([&](BaseProc* proc) -> BaseProc* { if (proc && acquireProc(accessor, proc, "frm::BaseProcLink")) return proc; diff --git a/src/KingSystem/ActorSystem/actBaseProcLink.h b/src/KingSystem/ActorSystem/actBaseProcLink.h index df1e1aa6..c1d278e7 100644 --- a/src/KingSystem/ActorSystem/actBaseProcLink.h +++ b/src/KingSystem/ActorSystem/actBaseProcLink.h @@ -29,8 +29,8 @@ public: bool hasProcInCalcState() const; bool hasProcById(BaseProc* proc) const; - BaseProc* getProc(ActorLinkConstDataAccess* accessor, BaseProc* other_proc); - BaseProc* getProc(ActorLinkConstDataAccess* accessor); + BaseProc* getProc(ActorLinkConstDataAccess* accessor, BaseProc* other_proc) const; + BaseProc* getProc(ActorLinkConstDataAccess* accessor) const; /// Acquire the specified BaseProc. /// If a BaseProc has already been specified, it is released. |
