Minor optimization

This commit is contained in:
Peter Conrad 2018-03-02 21:13:03 +01:00
parent bbe2a8b289
commit b12205caf6

View file

@ -89,7 +89,7 @@ namespace fc {
template<typename T>
T& smart_ref<T>::operator = ( smart_ref<T>&& u ) {
if( &u == this ) return *impl;
if( impl ) delete impl;
delete impl;
impl = u.impl;
u.impl = nullptr;
return *impl;