mirror of https://github.com/AxioDL/metaforce.git
Ensure consistent override usage in TCachedToken
This commit is contained in:
parent
eefb975f23
commit
d1c2ae71c2
|
@ -137,13 +137,13 @@ public:
|
||||||
TCachedToken() = default;
|
TCachedToken() = default;
|
||||||
TCachedToken(const CToken& other) : TToken<T>(other) {}
|
TCachedToken(const CToken& other) : TToken<T>(other) {}
|
||||||
TCachedToken(CToken&& other) : TToken<T>(std::move(other)) {}
|
TCachedToken(CToken&& other) : TToken<T>(std::move(other)) {}
|
||||||
T* GetObj() {
|
T* GetObj() override {
|
||||||
if (!m_obj)
|
if (!m_obj)
|
||||||
m_obj = TToken<T>::GetObj();
|
m_obj = TToken<T>::GetObj();
|
||||||
return m_obj;
|
return m_obj;
|
||||||
}
|
}
|
||||||
const T* GetObj() const { return const_cast<TCachedToken<T>*>(this)->GetObj(); }
|
const T* GetObj() const override { return const_cast<TCachedToken<T>*>(this)->GetObj(); }
|
||||||
void Unlock() {
|
void Unlock() override {
|
||||||
TToken<T>::Unlock();
|
TToken<T>::Unlock();
|
||||||
m_obj = nullptr;
|
m_obj = nullptr;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue