From d57824529dd42757b4f6e51348ac692c86ad6d7d Mon Sep 17 00:00:00 2001 From: Markus Engel Date: Mon, 21 Oct 2013 13:06:31 +0200 Subject: Fix bug introduced in r12686. Fixed bugs: - https://launchpad.net/bugs/1241034 (bzr r12702) --- src/sp-object.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/sp-object.cpp') diff --git a/src/sp-object.cpp b/src/sp-object.cpp index 8c54caf48..2408370cf 100644 --- a/src/sp-object.cpp +++ b/src/sp-object.cpp @@ -648,11 +648,6 @@ void SPObject::build(SPDocument *document, Inkscape::XML::Node *repr) { try { const std::string typeString = NodeTraits::get_type_string(*rchild); - // special cases - if (typeString.empty()) continue; // comments, usually - if (typeString == "rdf:RDF") continue; // no SP node yet - if (typeString == "inkscape:clipboard") continue; // SP node not necessary - SPObject* child = SPFactory::instance().createObject(typeString); object->attach(child, object->lastChild()); @@ -663,7 +658,7 @@ void SPObject::build(SPDocument *document, Inkscape::XML::Node *repr) { // corresponding classes in the SPObject tree. // (rdf:RDF, inkscape:clipboard, ...) // Thus, simply ignore this case for now. - return; + continue; } } } -- cgit v1.2.3 From 30c97ab939c645122e04862550a87838f79f634e Mon Sep 17 00:00:00 2001 From: Markus Engel Date: Sat, 26 Oct 2013 14:13:37 +0200 Subject: Fix memleak in reference counting introduced in r12532. Fixed bugs: - https://launchpad.net/bugs/1236632 (bzr r12727) --- src/sp-object.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/sp-object.cpp') diff --git a/src/sp-object.cpp b/src/sp-object.cpp index 2408370cf..e5f119ee0 100644 --- a/src/sp-object.cpp +++ b/src/sp-object.cpp @@ -228,7 +228,7 @@ SPObject *sp_object_unref(SPObject *object, SPObject *owner) //g_object_unref(G_OBJECT(object)); object->refCount--; - if (object->refCount < 0) { + if (object->refCount <= 0) { delete object; } -- cgit v1.2.3 From 9e6a3cc4552a1f4728e267057b3c86a11a656770 Mon Sep 17 00:00:00 2001 From: Kris De Gussem Date: Sun, 27 Oct 2013 21:18:05 +0100 Subject: "fix" some "unused parameter" warnings (bzr r12737) --- src/sp-object.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/sp-object.cpp') diff --git a/src/sp-object.cpp b/src/sp-object.cpp index e5f119ee0..4a32c9470 100644 --- a/src/sp-object.cpp +++ b/src/sp-object.cpp @@ -151,11 +151,11 @@ void SPObject::read_content() { //throw; } -void SPObject::update(SPCtx* ctx, unsigned int flags) { +void SPObject::update(SPCtx* /*ctx*/, unsigned int /*flags*/) { //throw; } -void SPObject::modified(unsigned int flags) { +void SPObject::modified(unsigned int /*flags*/) { //throw; } @@ -624,7 +624,7 @@ void SPObject::remove_child(Inkscape::XML::Node* child) { } } -void SPObject::order_changed(Inkscape::XML::Node *child, Inkscape::XML::Node * old_ref, Inkscape::XML::Node *new_ref) { +void SPObject::order_changed(Inkscape::XML::Node *child, Inkscape::XML::Node * /*old_ref*/, Inkscape::XML::Node *new_ref) { SPObject* object = this; SPObject *ochild = object->get_child_by_repr(child); -- cgit v1.2.3