Don't give a broken copy constructor to BehaviorContextObject. (#1002)

* Don't give a broken copy constructor to BehaviorContextObject.

This used to be required by the serialization system, now it handles non-copyable and non-moveable types.

* Explicitly delete the copy constructor instead of defaulting, which implicitly deletes it.

Some compilers complain about such an implicit deletion, and we should be explicit about our intent anyways

Signed-off-by: John <jonawals@amazon.com>
This commit is contained in:
yuriy0
2021-06-25 18:32:27 -04:00
committed by John
parent 9f034b90a2
commit fd4f363fe2
@@ -120,6 +120,7 @@ namespace ScriptCanvas
AZ_FORCE_INLINE BehaviorContextObject() = default;
BehaviorContextObject& operator=(const BehaviorContextObject&) = delete;
BehaviorContextObject(const BehaviorContextObject&) = delete;
// copy ctor
AZ_FORCE_INLINE BehaviorContextObject(const void* source, const AnyTypeInfo& typeInfo, AZ::u32 flags);
@@ -138,13 +139,6 @@ namespace ScriptCanvas
AZ_FORCE_INLINE void add_ref();
void release();
public:
// no copying allowed, this is here to allow compile time compatibility with storage in of BehaviorContextObjectPtr AZStd::any, only
AZ_FORCE_INLINE BehaviorContextObject(const BehaviorContextObject&)
{
AZ_Assert(false, "no copying allowed, this is here to allow storage in of BehaviorContextObjectPtr AZStd::any, only");
}
};
AZ_FORCE_INLINE BehaviorContextObject::BehaviorContextObject(const void* value, const AnyTypeInfo& typeInfo, AZ::u32 flags)