mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2024-11-14 19:25:16 -05:00
Remove duplicate pushUnique
This commit is contained in:
parent
041b5749d6
commit
92785166ef
1 changed files with 0 additions and 7 deletions
|
@ -23,13 +23,6 @@ class ArrayTools
|
|||
return result;
|
||||
}
|
||||
|
||||
public static function pushUnique<T>(array:Array<T>, element:T):Bool
|
||||
{
|
||||
if (array.contains(element)) return false;
|
||||
array.push(element);
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the first element of the array that satisfies the predicate, or null if none do.
|
||||
* @param input The array to search
|
||||
|
|
Loading…
Reference in a new issue