summaryrefslogtreecommitdiffstats
path: root/src/sp-mask.cpp
diff options
context:
space:
mode:
authorMarkus Engel <markus.engel@tum.de>2013-04-01 23:41:30 +0000
committerMarkus Engel <markus.engel@tum.de>2013-04-01 23:41:30 +0000
commit69f3b6f1abb2bb422935d43262e1e99aab359954 (patch)
treee1e2d2b0504d22e81b04501155995f5694a4cd7b /src/sp-mask.cpp
parentAdded experimental constructor to SPRect. Memory leaks because of non-virtual... (diff)
downloadinkscape-69f3b6f1abb2bb422935d43262e1e99aab359954.tar.gz
inkscape-69f3b6f1abb2bb422935d43262e1e99aab359954.zip
Added constructors to SP classes.
(bzr r11608.1.67)
Diffstat (limited to 'src/sp-mask.cpp')
-rw-r--r--src/sp-mask.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/sp-mask.cpp b/src/sp-mask.cpp
index 4029d03aa..cb91418b6 100644
--- a/src/sp-mask.cpp
+++ b/src/sp-mask.cpp
@@ -37,7 +37,7 @@ struct SPMaskView {
SPMaskView *sp_mask_view_new_prepend (SPMaskView *list, unsigned int key, Inkscape::DrawingItem *arenaitem);
SPMaskView *sp_mask_view_list_remove (SPMaskView *list, SPMaskView *view);
-G_DEFINE_TYPE(SPMask, sp_mask, SP_TYPE_OBJECTGROUP);
+G_DEFINE_TYPE(SPMask, sp_mask, G_TYPE_OBJECT);
static void
sp_mask_class_init (SPMaskClass *klass)
@@ -51,9 +51,9 @@ CMask::CMask(SPMask* mask) : CObjectGroup(mask) {
CMask::~CMask() {
}
-static void
-sp_mask_init (SPMask *mask)
-{
+SPMask::SPMask() : SPObjectGroup() {
+ SPMask* mask = this;
+
mask->cmask = new CMask(mask);
mask->typeHierarchy.insert(typeid(SPMask));
@@ -70,6 +70,12 @@ sp_mask_init (SPMask *mask)
mask->display = NULL;
}
+static void
+sp_mask_init (SPMask *mask)
+{
+ new (mask) SPMask();
+}
+
void CMask::build(SPDocument* doc, Inkscape::XML::Node* repr) {
SPMask* object = this->spmask;