diff options
author | Vitor Sousa <vitorsousa@vitorsousa-ws.(none)> | 2014-05-28 17:54:01 +0900 |
---|---|---|
committer | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2014-05-28 17:54:01 +0900 |
commit | b5718761b9b91f1cd5817bbce9591d7aa75be12e (patch) | |
tree | 4f3b516a60c298b1e326adbcb0f4d5452e8b674e | |
parent | 062c08fbabdd80707abe3ecfddf25f48f2d35221 (diff) | |
download | efl-b5718761b9b91f1cd5817bbce9591d7aa75be12e.tar.gz |
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
-rw-r--r-- | src/bindings/eina_cxx/eina_accessor.hh | 5 |
1 files changed, 1 insertions, 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<T>::*unspecified_bool_type)() const; -public: - operator unspecified_bool_type() const + explicit operator bool() const { return native_handle() ? &accessor<T>::native_handle : 0 ; } |