aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Common/Memory/Box.cs
diff options
context:
space:
mode:
authorMary <mary@mary.zone>2022-06-24 19:04:57 +0200
committerGitHub <noreply@github.com>2022-06-24 19:04:57 +0200
commit30ee70a9bc9529772198a51b1b9a605932d2ea96 (patch)
tree93073c3338d139189685fc292c5fd1ad147a2c86 /Ryujinx.Common/Memory/Box.cs
parent232b1012b0c981830ac46bd5024dcc0e35075301 (diff)
time: Make TimeZoneRule blittable and avoid copies (#3361)1.1.156
* 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
Diffstat (limited to 'Ryujinx.Common/Memory/Box.cs')
-rw-r--r--Ryujinx.Common/Memory/Box.cs12
1 files changed, 12 insertions, 0 deletions
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<T> where T : unmanaged
+ {
+ public T Data;
+
+ public Box()
+ {
+ Data = new T();
+ }
+ }
+}