From 30ee70a9bc9529772198a51b1b9a605932d2ea96 Mon Sep 17 00:00:00 2001 From: Mary Date: Fri, 24 Jun 2022 19:04:57 +0200 Subject: time: Make TimeZoneRule blittable and avoid copies (#3361) * time: Make TimeZoneRule blittable and avoid copies This drastically reduce overhead of using TimeZoneRule around the codebase. Effect on games is unknown * Add missing Box type * Ensure we clean the structure still This doesn't perform any copies * Address gdkchan's comments * Simplify Box --- Ryujinx.Common/Memory/Box.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 Ryujinx.Common/Memory/Box.cs (limited to 'Ryujinx.Common/Memory/Box.cs') diff --git a/Ryujinx.Common/Memory/Box.cs b/Ryujinx.Common/Memory/Box.cs new file mode 100644 index 00000000..743cc31d --- /dev/null +++ b/Ryujinx.Common/Memory/Box.cs @@ -0,0 +1,12 @@ +namespace Ryujinx.Common.Memory +{ + public class Box where T : unmanaged + { + public T Data; + + public Box() + { + Data = new T(); + } + } +} -- cgit v1.2.3