raster pushed a commit to branch master.
http://git.enlightenment.org/core/efl.git/commit/?id=b5718761b9b91f1cd5817bbce9591d7aa75be12e
commit b5718761b9b91f1cd5817bbce9591d7aa75be12e
Author: Vitor Sousa <vitorsousa@vitorsousa-ws.(none)>
Date: Wed May 28 17:54:01 2014 +0900
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 b389b31..5798c9b 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 ;
}
--