aboutsummaryrefslogtreecommitdiff
path: root/ARMeilleure/IntermediateRepresentation
diff options
context:
space:
mode:
authorAndrey Sukharev <SukharevAndrey@users.noreply.github.com>2022-12-05 16:47:39 +0300
committerGitHub <noreply@github.com>2022-12-05 14:47:39 +0100
commit4da44e09cb2a32f69b4a6b47221117b78e4618dc (patch)
treec3648a09202374dabff6fac472fe341bf9e1f0ee /ARMeilleure/IntermediateRepresentation
parentae13f0ab4da5b371bba746c1bd6598baaa44585d (diff)
Make structs readonly when applicable (#4002)
* Make all structs readonly when applicable. It should reduce amount of needless defensive copies * Make structs with trivial boilerplate equality code record structs * Remove unnecessary readonly modifiers from TextureCreateInfo * Make BitMap structs readonly too
Diffstat (limited to 'ARMeilleure/IntermediateRepresentation')
-rw-r--r--ARMeilleure/IntermediateRepresentation/PhiOperation.cs2
-rw-r--r--ARMeilleure/IntermediateRepresentation/Register.cs2
2 files changed, 2 insertions, 2 deletions
diff --git a/ARMeilleure/IntermediateRepresentation/PhiOperation.cs b/ARMeilleure/IntermediateRepresentation/PhiOperation.cs
index f2430882..d2a3cf21 100644
--- a/ARMeilleure/IntermediateRepresentation/PhiOperation.cs
+++ b/ARMeilleure/IntermediateRepresentation/PhiOperation.cs
@@ -3,7 +3,7 @@ using static ARMeilleure.IntermediateRepresentation.Operand.Factory;
namespace ARMeilleure.IntermediateRepresentation
{
- struct PhiOperation
+ readonly struct PhiOperation
{
private readonly Operation _operation;
diff --git a/ARMeilleure/IntermediateRepresentation/Register.cs b/ARMeilleure/IntermediateRepresentation/Register.cs
index 745b3153..241e4d13 100644
--- a/ARMeilleure/IntermediateRepresentation/Register.cs
+++ b/ARMeilleure/IntermediateRepresentation/Register.cs
@@ -2,7 +2,7 @@ using System;
namespace ARMeilleure.IntermediateRepresentation
{
- struct Register : IEquatable<Register>
+ readonly struct Register : IEquatable<Register>
{
public int Index { get; }