From 4e391e30171474abab46983a90de67d1ef2d8062 Mon Sep 17 00:00:00 2001 From: Brandon Thetford Date: Thu, 15 Feb 2024 18:42:00 -0700 Subject: [PATCH] Carry reference passing through as appropriate --- Terminal.Gui/Drawing/Attribute.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Terminal.Gui/Drawing/Attribute.cs b/Terminal.Gui/Drawing/Attribute.cs index 4de75858e..4afba6aee 100644 --- a/Terminal.Gui/Drawing/Attribute.cs +++ b/Terminal.Gui/Drawing/Attribute.cs @@ -57,7 +57,7 @@ public readonly struct Attribute : IEquatable, IEqualityOperatorsplatform-dependent color value. /// Foreground /// Background - internal Attribute (int platformColor, in Color foreground, in Color background) + internal Attribute (int platformColor, Color foreground, Color background) { Foreground = foreground; Background = background; @@ -81,7 +81,7 @@ public readonly struct Attribute : IEquatable, IEqualityOperators will be set to the specified color. /// /// Value. - internal Attribute (ColorName colorName) : this (colorName, colorName) { } + internal Attribute (in ColorName colorName) : this (in colorName, in colorName) { } /// Initializes a new instance of the struct. /// Foreground @@ -93,19 +93,19 @@ public readonly struct Attribute : IEquatable, IEqualityOperatorsInitializes a new instance of the struct. /// Foreground /// Background - public Attribute (ColorName foregroundName, Color background) : this (new Color (foregroundName), background) { } + public Attribute (in ColorName foregroundName, in Color background) : this (new Color (foregroundName), in background) { } /// Initializes a new instance of the struct. /// Foreground /// Background - public Attribute (Color foreground, ColorName backgroundName) : this (foreground, new Color (backgroundName)) { } + public Attribute (in Color foreground, in ColorName backgroundName) : this (foreground, new Color (backgroundName)) { } /// /// Initializes a new instance of the struct with the same colors for the foreground and /// background. /// /// The color. - public Attribute (Color color) : this (color, color) { } + public Attribute (in Color color) : this (color, color) { } /// Compares two attributes for equality. ///