Browse Source

vlc_shared_data_ptr: make operator bool() explicit

Like unique_ptr, make the operator bool() explicit, so that it is only
called implicitly when the value may be "contextually converted to bool"
(if, while, etc.).

Suggested-by: Filip Roséen <filip@atch.se>
Signed-off-by: Thomas Guillem <thomas@gllm.fr>
pull/83/head
Romain Vimont 7 years ago
committed by Thomas Guillem
parent
commit
bd319b9172
  1. 2
      include/vlc_cxx_helpers.hpp

2
include/vlc_cxx_helpers.hpp

@ -207,7 +207,7 @@ public:
return !(*this == other);
}
operator bool() const
explicit operator bool() const
{
return ptr;
}

Loading…
Cancel
Save