2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 14:27:42 +00:00

RuntimeCommon: Use const on member functions where applicable

Adds missing const qualifiers on class member functions that don't
modify instance state.
This commit is contained in:
Lioncash
2019-08-14 06:04:11 -04:00
parent cf294db9eb
commit d3d629d405
91 changed files with 269 additions and 248 deletions

View File

@@ -17,6 +17,7 @@ class TObjOwnerParam : public IVParamObj {
public:
TObjOwnerParam(T&& obj) : m_param(std::move(obj)) {}
T& GetParam() { return m_param; }
const T& GetParam() const { return m_param; }
};
class CVParamTransfer {
@@ -27,7 +28,7 @@ public:
CVParamTransfer(IVParamObj* obj) : m_ref(obj) {}
CVParamTransfer(const CVParamTransfer& other) : m_ref(other.m_ref) {}
IVParamObj* GetObj() const { return m_ref.get(); }
CVParamTransfer ShareTransferRef() { return CVParamTransfer(*this); }
CVParamTransfer ShareTransferRef() const { return CVParamTransfer(*this); }
template <class T>
T& GetOwnedObj() const {