Mercurial > projects > dwt-addons
diff dwtx/jface/text/TextAttribute.d @ 160:3678e4f1a766
toHash, toString
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Wed, 27 Aug 2008 02:07:22 +0200 |
parents | 000f9136b8f7 |
children | 1a5b8f8129df |
line wrap: on
line diff
--- a/dwtx/jface/text/TextAttribute.d Wed Aug 27 01:57:58 2008 +0200 +++ b/dwtx/jface/text/TextAttribute.d Wed Aug 27 02:07:22 2008 +0200 @@ -277,13 +277,13 @@ /* * @see Object#hashCode() */ - public int hashCode() { + public override hash_t toHash() { if (fHashCode is 0) { int multiplier= 37; // some prime fHashCode= 13; // some random value - fHashCode= multiplier * fHashCode + (font is null ? 0 : font.hashCode()); - fHashCode= multiplier * fHashCode + (background is null ? 0 : background.hashCode()); - fHashCode= multiplier * fHashCode + (foreground is null ? 0 : foreground.hashCode()); + fHashCode= multiplier * fHashCode + (font is null ? 0 : font.toHash()); + fHashCode= multiplier * fHashCode + (background is null ? 0 : background.toHash()); + fHashCode= multiplier * fHashCode + (foreground is null ? 0 : foreground.toHash()); fHashCode= multiplier * fHashCode + style; } return fHashCode;