Use explicit operator bool()
This commit is contained in:
1 parent
174a45cfe7
commit
ce921e31be
1 file changed
+1
-6
+1
-6
@@ -122,12 +122,7 @@ public:
|
||||
return *ptr;
|
||||
}
|
||||
|
||||
bool operator!() const
|
||||
{
|
||||
return !ptr;
|
||||
}
|
||||
|
||||
operator bool() const
|
||||
explicit operator bool() const
|
||||
{
|
||||
return ptr != nullptr;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user