Replace obsolete safe bool idiom with explicit operator bool 03/269403/4
authorArtur Świgoń <a.swigon@samsung.com>
Thu, 13 Jan 2022 16:45:50 +0000 (17:45 +0100)
committerArtur Świgoń <a.swigon@samsung.com>
Mon, 17 Jan 2022 09:27:39 +0000 (10:27 +0100)
commit56fcc34b1d6a9febefd8bd638e0d51f2619d7d79
treeca0f4d7839fe91615a1791f7ea8ca080d49bf0cd
parent7e4e51d6bf2da9a03645005f7c51a60540633d6a
Replace obsolete safe bool idiom with explicit operator bool

C++11 introduces 'explicit operator bool' to prevent unintended implicit
conversions to 'bool', thus making the trick with converting to a
pointer-to-member (a.k.a. "safe bool idiom") obsolete.

The explicit operator is more restrictive than 'safe bool', and it
helped uncover a bug in the test suite where object handles were
implicitly converted to bool before being sent to an std::ostream.

Change-Id: Ib86383601d63acf1577130db9e4bca7dc486a323
dali-extension/camera-player/tizen-camera-player.cpp
dali-extension/video-player/ecore-wl/tizen-video-player-ecore-wl.cpp
dali-extension/video-player/ecore-wl2/tizen-video-player-ecore-wl2.cpp