Browse Source

Merge pull request #156 from Banane9/V2

Remove unnecessary assignment/checks from Color32

Former-commit-id: d2c41db017e0245a91d14c19bb9ee17f85341135
Former-commit-id: a5d597784db57e92b8a175167ce729909205a6b1
Former-commit-id: e60c4ed883ab280853bd8a3bd934c9b8f22bf8f4
af/merge-core
James South 11 years ago
parent
commit
7ea58b82d6
  1. 7
      src/ImageProcessor/Imaging/Colors/Color32.cs

7
src/ImageProcessor/Imaging/Colors/Color32.cs

@ -76,9 +76,6 @@ namespace ImageProcessor.Imaging.Colors
this.R = red;
this.G = green;
this.B = blue;
// Stolen from Color.
this.Argb = (int)(((uint)((((red << 0x10) | (green << 8)) | blue) | (alpha << 0x18))) & 0xffffffffL);
}
/// <summary>
@ -114,7 +111,7 @@ namespace ImageProcessor.Imaging.Colors
{
Color32 color32 = (Color32)obj;
return this.B == color32.B && this.G == color32.G & this.R == color32.R & this.A == color32.A;
return this.Argb == color32.Argb;
}
return false;
@ -152,4 +149,4 @@ namespace ImageProcessor.Imaging.Colors
}
}
}
}
}
Loading…
Cancel
Save