From 2e7b36c06f8cc2c4b58c1fbc84444a06efaa14f4 Mon Sep 17 00:00:00 2001 From: James Jackson-South Date: Mon, 17 Apr 2017 21:54:15 +1000 Subject: [PATCH] Remove unneeded constants --- src/ImageSharp/Colors/ColorVector.cs | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/src/ImageSharp/Colors/ColorVector.cs b/src/ImageSharp/Colors/ColorVector.cs index d9eb1906d..3e86e85c7 100644 --- a/src/ImageSharp/Colors/ColorVector.cs +++ b/src/ImageSharp/Colors/ColorVector.cs @@ -18,26 +18,6 @@ namespace ImageSharp /// public partial struct ColorVector : IPixel { - /// - /// The shift count for the red component - /// - private const int RedShift = 0; - - /// - /// The shift count for the green component - /// - private const int GreenShift = 8; - - /// - /// The shift count for the blue component - /// - private const int BlueShift = 16; - - /// - /// The shift count for the alpha component - /// - private const int AlphaShift = 24; - /// /// The maximum byte value. /// @@ -240,7 +220,7 @@ namespace ImageSharp { Vector4 vector = this.backingVector * MaxBytes; vector += Half; - uint hexOrder = (uint)((byte)vector.X << RedShift | (byte)vector.Y << GreenShift | (byte)vector.Z << BlueShift | (byte)vector.W << AlphaShift); + uint hexOrder = (uint)((byte)vector.X | (byte)vector.Y << 8 | (byte)vector.Z << 16 | (byte)vector.W << 24); return hexOrder.ToString("X8"); }