summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVitor Sousa <vitorsousa@vitorsousa-ws.(none)>2014-05-28 17:54:01 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-05-28 17:54:01 +0900
commitb5718761b9b91f1cd5817bbce9591d7aa75be12e (patch)
tree4f3b516a60c298b1e326adbcb0f4d5452e8b674e
parent062c08fbabdd80707abe3ecfddf25f48f2d35221 (diff)
downloadefl-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.hh5
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 ;
}