Favor passing Tag as value since it's just uint32 under the hood
This commit is contained in:
@@ -55,7 +55,7 @@ Tag Tags::Get(const StringView& tagName)
|
||||
return tag;
|
||||
}
|
||||
|
||||
bool Tags::HasTag(const Array<Tag>& list, const Tag& tag)
|
||||
bool Tags::HasTag(const Array<Tag>& list, const Tag tag)
|
||||
{
|
||||
if (tag.Index == 0)
|
||||
return false;
|
||||
@@ -69,7 +69,7 @@ bool Tags::HasTag(const Array<Tag>& list, const Tag& tag)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Tags::HasTagExact(const Array<Tag>& list, const Tag& tag)
|
||||
bool Tags::HasTagExact(const Array<Tag>& list, const Tag tag)
|
||||
{
|
||||
if (tag.Index == 0)
|
||||
return false;
|
||||
|
||||
@@ -99,7 +99,7 @@ public:
|
||||
/// <param name="list">The tags list to use.</param>
|
||||
/// <param name="tag">The tag to check.</param>
|
||||
/// <returns>True if given tag is contained by the list of tags. Returns false for empty list.</returns>
|
||||
static bool HasTag(const Array<Tag>& list, const Tag& tag);
|
||||
static bool HasTag(const Array<Tag>& list, const Tag tag);
|
||||
|
||||
/// <summary>
|
||||
/// Checks if the list of tags contains a given tag (exact match). For example, HasTag({"A.B"}, "A") returns false, for parents check use HasTag.
|
||||
@@ -107,7 +107,7 @@ public:
|
||||
/// <param name="list">The tags list to use.</param>
|
||||
/// <param name="tag">The tag to check.</param>
|
||||
/// <returns>True if given tag is contained by the list of tags. Returns false for empty list.</returns>
|
||||
static bool HasTagExact(const Array<Tag>& list, const Tag& tag);
|
||||
static bool HasTagExact(const Array<Tag>& list, const Tag tag);
|
||||
|
||||
/// <summary>
|
||||
/// Checks if the list of tags contains any of the given tags (including parent tags check). For example, HasAny({"A.B", "C"}, {"A"}) returns true, for exact check use HasAnyExact.
|
||||
|
||||
Reference in New Issue
Block a user