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
This commit is contained in:
Vitor Sousa 2014-05-28 17:54:01 +09:00 committed by Carsten Haitzler (Rasterman)
parent 062c08fbab
commit b5718761b9
1 changed files with 1 additions and 4 deletions

View File

@ -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 ;
}