WIP: Brush assets project #106303

Draft
Julian Eisel wants to merge 370 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 12 additions and 12 deletions
Showing only changes of commit 84997955b4 - Show all commits

View File

@ -67,21 +67,18 @@ AssetWeakReference &AssetWeakReference::operator=(AssetWeakReference &&other)
return *this; return *this;
} }
bool AssetWeakReference::operator==(const AssetWeakReference &other) const bool operator==(const AssetWeakReference &a, const AssetWeakReference &b)
{ {
if (asset_library_type != other.asset_library_type) { if (a.asset_library_type != b.asset_library_type) {
return false; return false;
} }
if (StringRef(asset_library_identifier) != StringRef(other.asset_library_identifier)) { if (!STREQ(a.asset_library_identifier, b.asset_library_identifier)) {
return false; return false;
} }
if (!STREQ(a.relative_asset_identifier, b.relative_asset_identifier)) {
return StringRef(relative_asset_identifier) == StringRef(other.relative_asset_identifier); return false;
} }
return true;
bool AssetWeakReference::operator!=(const AssetWeakReference &other) const
{
return !(*this == other);
} }
AssetWeakReference AssetWeakReference::make_reference( AssetWeakReference AssetWeakReference::make_reference(

View File

@ -174,8 +174,11 @@ typedef struct AssetWeakReference {
AssetWeakReference &operator=(AssetWeakReference &&); AssetWeakReference &operator=(AssetWeakReference &&);
~AssetWeakReference(); ~AssetWeakReference();
bool operator==(const AssetWeakReference &other) const; friend bool operator==(const AssetWeakReference &a, const AssetWeakReference &b);
bool operator!=(const AssetWeakReference &other) const; friend bool operator!=(const AssetWeakReference &a, const AssetWeakReference &b)
{
return !(a == b);
}
/** /**
* See AssetRepresentation::make_weak_reference(). * See AssetRepresentation::make_weak_reference().