From 39f115815c2cdd5f75284049f89a71da4ede0aed Mon Sep 17 00:00:00 2001 From: Abnormal <86753001+AbnormalPoof@users.noreply.github.com> Date: Wed, 30 Oct 2024 12:02:41 -0500 Subject: [PATCH] more reflectutil additions --- source/funkin/util/ReflectUtil.hx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/source/funkin/util/ReflectUtil.hx b/source/funkin/util/ReflectUtil.hx index da98c820b5..67baf1b858 100644 --- a/source/funkin/util/ReflectUtil.hx +++ b/source/funkin/util/ReflectUtil.hx @@ -48,4 +48,19 @@ class ReflectUtil { return Reflect.hasField(obj, name); } + + public static function copyAnonymousFieldsOf(obj:Dynamic):Dynamic + { + return Reflect.copy(obj); + } + + public static function deleteAnonymousField(obj:Dynamic, name:String):Bool + { + return Reflect.deleteField(obj, name); + } + + public static function compareValues(valueA:Dynamic, valueB:Dynamic):Int + { + return Reflect.compare(valueA, valueB); + } }