Use explicit operator bool()
This commit is contained in:
parent
174a45cfe7
commit
ce921e31be
@ -122,12 +122,7 @@ public:
|
||||
return *ptr;
|
||||
}
|
||||
|
||||
bool operator!() const
|
||||
{
|
||||
return !ptr;
|
||||
}
|
||||
|
||||
operator bool() const
|
||||
explicit operator bool() const
|
||||
{
|
||||
return ptr != nullptr;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user