mirror of
https://code.videolan.org/videolan/vlc
synced 2024-09-24 20:48:52 +02:00
cxx helpers: shared_data: Add nullptr comparison operators
Signed-off-by: Thomas Guillem <thomas@gllm.fr>
This commit is contained in:
parent
3475e434cd
commit
741eca07fc
@ -202,11 +202,21 @@ public:
|
||||
return ptr == other.ptr;
|
||||
}
|
||||
|
||||
bool operator==(std::nullptr_t) const noexcept
|
||||
{
|
||||
return ptr == nullptr;
|
||||
}
|
||||
|
||||
bool operator!=(const vlc_shared_data_ptr &other) const
|
||||
{
|
||||
return !(*this == other);
|
||||
}
|
||||
|
||||
bool operator!=(std::nullptr_t) const noexcept
|
||||
{
|
||||
return ptr != nullptr;
|
||||
}
|
||||
|
||||
explicit operator bool() const
|
||||
{
|
||||
return ptr;
|
||||
|
Loading…
Reference in New Issue
Block a user