summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Wey2011-07-06 23:55:40 +0200
committerMike Wey2011-07-06 23:55:40 +0200
commit67f1bb5c361fb002bb3bf135e285e131901f9f2e (patch)
treedac7c35ab602a307c366ddd8b1e9628e2bf61943
parent7e3fb8e509b9a500e61444ffa137cf08c8d15273 (diff)
Changes for dmd 2.054
-rw-r--r--dmagick/Color.d7
-rw-r--r--dmagick/Exception.d5
-rw-r--r--dmagick/Geometry.d4
3 files changed, 12 insertions, 4 deletions
diff --git a/dmagick/Color.d b/dmagick/Color.d
index acd16d3..f42d4d2 100644
--- a/dmagick/Color.d
+++ b/dmagick/Color.d
@@ -84,8 +84,13 @@ class Color
return *packet;
}
- bool opEquals(Color color)
+ override bool opEquals(Object obj)
{
+ Color color = cast(Color)obj;
+
+ if ( color is null )
+ return false;
+
return pixelPacket == color.pixelPacket;
}
diff --git a/dmagick/Exception.d b/dmagick/Exception.d
index 23f07a6..17276a3 100644
--- a/dmagick/Exception.d
+++ b/dmagick/Exception.d
@@ -75,7 +75,10 @@ class DMagickException : Exception
break;";
}
- return exceptions ~= "}";
+ return exceptions ~=
+ " default:
+ return;
+ }";
}());
}
}
diff --git a/dmagick/Geometry.d b/dmagick/Geometry.d
index c093f91..2ccab99 100644
--- a/dmagick/Geometry.d
+++ b/dmagick/Geometry.d
@@ -7,7 +7,7 @@
module dmagick.Geometry;
import std.conv;
-import std.ctype;
+import std.ascii;
import std.string;
import core.sys.posix.sys.types;
@@ -39,7 +39,7 @@ struct Geometry
MagickStatusType flags;
//If the string starts with a letter assume it's a Page Geometry.
- if ( isalpha(geometry[0]) )
+ if ( isAlpha(geometry[0]) )
{
char* geo = GetPageGeometry(toStringz(geometry));