From: Travis Reitter Date: Fri, 21 Oct 2011 22:54:07 +0000 (-0700) Subject: Check the GLib.Type of both elements for AbstractFieldDetails.equal() X-Git-Tag: FOLKS_0_6_5~26 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f9af4cbcb3a378bc375f406ff0336f293bd2bf92;p=platform%2Fupstream%2Ffolks.git Check the GLib.Type of both elements for AbstractFieldDetails.equal() This simplifies the code for overridden equal() functions. --- diff --git a/folks/abstract-field-details.vala b/folks/abstract-field-details.vala index f54670a..960406a 100644 --- a/folks/abstract-field-details.vala +++ b/folks/abstract-field-details.vala @@ -254,7 +254,9 @@ public abstract class Folks.AbstractFieldDetails : Object */ public virtual bool equal (AbstractFieldDetails that) { - return this.values_equal (that) && this.parameters_equal (that); + return (this.get_type () == that.get_type ()) && + this.values_equal (that) && + this.parameters_equal (that); } /**