Commit 815c23ae authored by Martin Heistermann's avatar Martin Heistermann

BaseProperty: clear resMan_ when moving from this class to preserve invariant...

BaseProperty: clear resMan_ when moving from this class to preserve invariant depended on in PropertyPtr destructor.
parent 0ad436fe
......@@ -50,10 +50,17 @@ public:
explicit BaseProperty(ResourceManager* _resMan) : resMan_(_resMan) {}
BaseProperty(BaseProperty&& _other) = default;
BaseProperty(const BaseProperty& _other) = default;
BaseProperty& operator=(const BaseProperty& _cpy) = delete;
BaseProperty(BaseProperty&& _other) {
resMan_ = _other.resMan_;
_other.resMan_ = nullptr;
}
BaseProperty& operator=(BaseProperty&& _other) {
resMan_ = _other.resMan_;
_other.resMan_ = nullptr;
return *this;
}
virtual ~BaseProperty();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment