From c575c1af3d6d6549fce69514eaa6de5392e5f9bf Mon Sep 17 00:00:00 2001 From: Mike Wey Date: Wed, 15 Feb 2012 22:03:30 +0100 Subject: Add an opCast for Object. This is needed for dmd 2.058 and up. --- dmagick/Color.d | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'dmagick') diff --git a/dmagick/Color.d b/dmagick/Color.d index c9ea1ee..cb17cf0 100644 --- a/dmagick/Color.d +++ b/dmagick/Color.d @@ -133,6 +133,15 @@ class Color assert(color.toString() == "#0000000000000000FFFFFFFF"); } + /* + * Needed when comparing colors with dmd 2.058. + */ + Object opCast(T)() + if ( is(T == Object) ) + { + return this; + } + /** * Support casting between different colors. * You can also use std.conv.to -- cgit v1.2.3