mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 10:37:45 +00:00
AK: Delete operator!() and operator bool() from the Nonnull pointers
Since NonnullRefPtr and NonnullOwnPtr cannot be null, it is pointless to convert them to a bool, since it would always be true. This patch makes it an error to null-check one of these pointers.
This commit is contained in:
parent
b88ff97537
commit
68e23bca3f
2 changed files with 6 additions and 0 deletions
|
@ -121,6 +121,9 @@ public:
|
|||
CALLABLE_WHEN(unconsumed)
|
||||
operator T*() { return m_ptr; }
|
||||
|
||||
operator bool() const = delete;
|
||||
bool operator!() const = delete;
|
||||
|
||||
private:
|
||||
void clear()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue