Author: spouliot
Date: 2006-05-30 14:54:32 -0400 (Tue, 30 May 2006)
New Revision: 61276
Modified:
trunk/mcs/class/System.Drawing/System.Drawing.Imaging/ChangeLog
trunk/mcs/class/System.Drawing/System.Drawing.Imaging/ImageFormat.cs
Log:
2006-05-30 Sebastien Pouliot <[EMAIL PROTECTED]>
* ImageFormat.cs: Avoid double-cast in Equals method.
Modified: trunk/mcs/class/System.Drawing/System.Drawing.Imaging/ChangeLog
===================================================================
--- trunk/mcs/class/System.Drawing/System.Drawing.Imaging/ChangeLog
2006-05-30 18:53:38 UTC (rev 61275)
+++ trunk/mcs/class/System.Drawing/System.Drawing.Imaging/ChangeLog
2006-05-30 18:54:32 UTC (rev 61276)
@@ -1,3 +1,7 @@
+2006-05-30 Sebastien Pouliot <[EMAIL PROTECTED]>
+
+ * ImageFormat.cs: Avoid double-cast in Equals method.
+
2006-05-24 Sebastien Pouliot <[EMAIL PROTECTED]>
* ImageFormat.cs: Fixed ToString method to match MS output.
Modified: trunk/mcs/class/System.Drawing/System.Drawing.Imaging/ImageFormat.cs
===================================================================
--- trunk/mcs/class/System.Drawing/System.Drawing.Imaging/ImageFormat.cs
2006-05-30 18:53:38 UTC (rev 61275)
+++ trunk/mcs/class/System.Drawing/System.Drawing.Imaging/ImageFormat.cs
2006-05-30 18:54:32 UTC (rev 61276)
@@ -58,13 +58,13 @@
// methods
- public override bool Equals(object o) {
-
- if (o is ImageFormat)
- if ( ((ImageFormat)o).Guid.Equals(this.Guid))
- return true;
- return false;
+ public override bool Equals (object o)
+ {
+ ImageFormat f = (o as ImageFormat);
+ if (f == null)
+ return false;
+ return f.Guid.Equals (guid);
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches