diff options
author | Jean-Philippe Andre <jp.andre@samsung.com> | 2017-11-02 14:26:59 +0900 |
---|---|---|
committer | Jean-Philippe Andre <jp.andre@samsung.com> | 2017-11-07 09:57:24 +0900 |
commit | 8c991b104ce23152eeab7132bee3c3ae78fef4c4 (patch) | |
tree | ef37b705ade3d030fc475d9c8e79405184d1371b | |
parent | 0d1a2db61756cdf361d63869ab1309b7bb91f289 (diff) | |
download | efl-8c991b104ce23152eeab7132bee3c3ae78fef4c4.tar.gz |
cxx: Add nullptr constructor for weak refs
This allows constructs such as:
wref_obj = obj;
...
wref_obj = nullptr;
-rw-r--r-- | src/bindings/cxx/eo_cxx/eo_wref.hh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/bindings/cxx/eo_cxx/eo_wref.hh b/src/bindings/cxx/eo_cxx/eo_wref.hh index fc32e47616..048ffcaa0f 100644 --- a/src/bindings/cxx/eo_cxx/eo_wref.hh +++ b/src/bindings/cxx/eo_cxx/eo_wref.hh @@ -27,6 +27,14 @@ struct wref wref() : _eo_wref(nullptr) { } + + /// @brief Empty constructor on nullptr. + /// + /// Create a empty weak reference. + /// + wref(std::nullptr_t) : _eo_wref(nullptr) + { + } /// @brief Class constructor. /// |