From b5718761b9b91f1cd5817bbce9591d7aa75be12e Mon Sep 17 00:00:00 2001 From: Vitor Sousa Date: Wed, 28 May 2014 17:54:01 +0900 Subject: [PATCH] C++11 explicit conversion from accessor to bollean Summary: Replaced the "safe bool idiom" by explicit conversion to bollean, in order to follow the improved conventions of the C++11. Reviewers: felipealmeida, cedric, woohyun, smohanty, raster Reviewed By: raster CC: savio, cedric Differential Revision: https://phab.enlightenment.org/D903 --- src/bindings/eina_cxx/eina_accessor.hh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/bindings/eina_cxx/eina_accessor.hh b/src/bindings/eina_cxx/eina_accessor.hh index b389b31bf7..5798c9b5e5 100644 --- a/src/bindings/eina_cxx/eina_accessor.hh +++ b/src/bindings/eina_cxx/eina_accessor.hh @@ -59,10 +59,7 @@ struct accessor { std::swap(_impl, other._impl); } -private: - typedef Eina_Accessor*(accessor::*unspecified_bool_type)() const; -public: - operator unspecified_bool_type() const + explicit operator bool() const { return native_handle() ? &accessor::native_handle : 0 ; }