mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2024-11-27 01:55:52 -05:00
Fix an issue with array.clone() on HTML5
This commit is contained in:
parent
67788d762d
commit
7a9bff248e
3 changed files with 17 additions and 15 deletions
|
@ -13,7 +13,7 @@ using Lambda;
|
||||||
using StringTools;
|
using StringTools;
|
||||||
using funkin.util.tools.ArraySortTools;
|
using funkin.util.tools.ArraySortTools;
|
||||||
using funkin.util.tools.ArrayTools;
|
using funkin.util.tools.ArrayTools;
|
||||||
using funkin.util.tools.DynamicTools;
|
using funkin.util.tools.DynamicAccessTools;
|
||||||
using funkin.util.tools.FloatTools;
|
using funkin.util.tools.FloatTools;
|
||||||
using funkin.util.tools.Int64Tools;
|
using funkin.util.tools.Int64Tools;
|
||||||
using funkin.util.tools.IntTools;
|
using funkin.util.tools.IntTools;
|
||||||
|
|
16
source/funkin/util/tools/DynamicAccessTools.hx
Normal file
16
source/funkin/util/tools/DynamicAccessTools.hx
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
package funkin.util.tools;
|
||||||
|
|
||||||
|
import haxe.DynamicAccess;
|
||||||
|
|
||||||
|
class DynamicAccessTools
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Creates a full clone of the input `DynamicAccess`.
|
||||||
|
* @param input The `Dynamic` to clone.
|
||||||
|
* @return A clone of the input `Dynamic`.
|
||||||
|
*/
|
||||||
|
public static function clone(input:DynamicAccess<T>):DynamicAccess<T>
|
||||||
|
{
|
||||||
|
return Reflect.copy(input);
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,14 +0,0 @@
|
||||||
package funkin.util.tools;
|
|
||||||
|
|
||||||
class DynamicTools
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Creates a full clone of the input `Dynamic`. Only guaranteed to work on anonymous structures.
|
|
||||||
* @param input The `Dynamic` to clone.
|
|
||||||
* @return A clone of the input `Dynamic`.
|
|
||||||
*/
|
|
||||||
public static function clone(input:Dynamic):Dynamic
|
|
||||||
{
|
|
||||||
return Reflect.copy(input);
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in a new issue