cxx: Mark wref::lock as const

This allows passing in wref to a lambda.
If we passed normal refs, we would end up with dangling references and
many ERR messages.
This commit is contained in:
Jean-Philippe Andre 2017-11-02 17:59:17 +09:00
parent 8c991b104c
commit 88e10da36b
1 changed files with 1 additions and 1 deletions

View File

@ -79,7 +79,7 @@ struct wref
/// strong reference to the <em>EO Object</em>. Otherwise it returns
/// an empty eina::optional.
///
eina::optional<T> lock()
eina::optional<T> lock() const
{
if(_eo_wref) // XXX eo_ref() should work on multi-threaded environments
{