summaryrefslogtreecommitdiffstats
path: root/src/sp-shape.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/sp-shape.h')
-rw-r--r--src/sp-shape.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/sp-shape.h b/src/sp-shape.h
index 85ac89a00..e0be6cbea 100644
--- a/src/sp-shape.h
+++ b/src/sp-shape.h
@@ -23,10 +23,8 @@
#include <sigc++/connection.h>
#define SP_TYPE_SHAPE (sp_shape_get_type ())
-#define SP_SHAPE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SP_TYPE_SHAPE, SPShape))
-#define SP_SHAPE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SP_TYPE_SHAPE, SPShapeClass))
-#define SP_IS_SHAPE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_SHAPE))
-#define SP_IS_SHAPE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SP_TYPE_SHAPE))
+#define SP_SHAPE(obj) ((SPShape*)obj)
+#define SP_IS_SHAPE(obj) (obj != NULL && static_cast<const SPObject*>(obj)->typeHierarchy.count(typeid(SPShape)))
#define SP_SHAPE_WRITE_PATH (1 << 2)