forked from enlightenment/efl
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:
parent
062c08fbab
commit
b5718761b9
|
@ -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 ;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue