WIP: Brush assets project #106303

Draft
Julian Eisel wants to merge 358 commits from brush-assets-project into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
2 changed files with 15 additions and 8 deletions
Showing only changes of commit 5e15c9caa7 - Show all commits

View File

@ -53,17 +53,23 @@ AssetWeakReference::~AssetWeakReference()
MEM_delete(relative_asset_identifier);
}
AssetWeakReference &AssetWeakReference::operator=(AssetWeakReference &&other)
AssetWeakReference &AssetWeakReference::operator=(const AssetWeakReference &other)
{
if (&other == this) {
if (this == &other) {
return *this;
}
asset_library_type = other.asset_library_type;
asset_library_identifier = other.asset_library_identifier;
relative_asset_identifier = other.relative_asset_identifier;
other.asset_library_type = 0; /* Not a valid type. */
other.asset_library_identifier = nullptr;
other.relative_asset_identifier = nullptr;
std::destroy_at(this);
new (this) AssetWeakReference(other);
return *this;
}
AssetWeakReference &AssetWeakReference::operator=(AssetWeakReference &&other)
{
if (this == &other) {
return *this;
}
std::destroy_at(this);
new (this) AssetWeakReference(std::move(other));
return *this;
}

View File

@ -171,6 +171,7 @@ typedef struct AssetWeakReference {
AssetWeakReference();
AssetWeakReference(const AssetWeakReference &);
AssetWeakReference(AssetWeakReference &&);
AssetWeakReference &operator=(const AssetWeakReference &);
AssetWeakReference &operator=(AssetWeakReference &&);
~AssetWeakReference();