WIP: Brush assets project #106303
|
@ -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(
|
||||||
|
|
|
@ -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().
|
||||||
|
|
Loading…
Reference in New Issue