Refactor: Remove unused move constructor for asset representation
This shouldn't be needed, and was incorrect anyway: It wasn't copying the owner asset library pointer.
This commit is contained in:
parent
0e7c2bac14
commit
a5a3125fe1
@ -67,16 +67,12 @@ class AssetRepresentation {
|
||||
AssetRepresentation(AssetIdentifier &&identifier,
|
||||
ID &id,
|
||||
const AssetLibrary &owner_asset_library);
|
||||
AssetRepresentation(AssetRepresentation &&other);
|
||||
/* Non-copyable type. */
|
||||
AssetRepresentation(const AssetRepresentation &other) = delete;
|
||||
~AssetRepresentation();
|
||||
|
||||
/* Non-move-assignable type. Move construction is fine, but treat the "identity" (e.g. local vs
|
||||
* external asset) of an asset representation as immutable. */
|
||||
AssetRepresentation &operator=(AssetRepresentation &&other) = delete;
|
||||
/* Non-copyable type. */
|
||||
AssetRepresentation &operator=(const AssetRepresentation &other) = delete;
|
||||
AssetRepresentation(const AssetRepresentation &) = delete;
|
||||
AssetRepresentation(AssetRepresentation &&) = delete;
|
||||
AssetRepresentation &operator=(AssetRepresentation &&) = delete;
|
||||
AssetRepresentation &operator=(const AssetRepresentation &) = delete;
|
||||
|
||||
const AssetIdentifier &get_identifier() const;
|
||||
|
||||
|
@ -46,18 +46,6 @@ AssetRepresentation::AssetRepresentation(AssetIdentifier &&identifier,
|
||||
}
|
||||
}
|
||||
|
||||
AssetRepresentation::AssetRepresentation(AssetRepresentation &&other)
|
||||
: identifier_(std::move(other.identifier_)), is_local_id_(other.is_local_id_)
|
||||
{
|
||||
if (is_local_id_) {
|
||||
local_asset_id_ = other.local_asset_id_;
|
||||
other.local_asset_id_ = nullptr;
|
||||
}
|
||||
else {
|
||||
external_asset_ = std::move(other.external_asset_);
|
||||
}
|
||||
}
|
||||
|
||||
AssetRepresentation::~AssetRepresentation()
|
||||
{
|
||||
if (!is_local_id_) {
|
||||
|
Loading…
Reference in New Issue
Block a user