mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-28 08:48:48 +02:00
vcmi: make ConstTransitivePtr always init self.
This commit is contained in:
parent
c8c38ac922
commit
b30d23d278
@ -16,7 +16,7 @@ VCMI_LIB_NAMESPACE_BEGIN
|
||||
template <typename T>
|
||||
class ConstTransitivePtr
|
||||
{
|
||||
T *ptr;
|
||||
T *ptr = nullptr;
|
||||
ConstTransitivePtr(const T *Ptr)
|
||||
: ptr(const_cast<T*>(Ptr))
|
||||
{}
|
||||
@ -25,10 +25,7 @@ public:
|
||||
: ptr(Ptr)
|
||||
{}
|
||||
ConstTransitivePtr(std::nullptr_t)
|
||||
: ptr(nullptr)
|
||||
{}
|
||||
|
||||
|
||||
const T& operator*() const
|
||||
{
|
||||
return *ptr;
|
||||
|
Loading…
Reference in New Issue
Block a user