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-item.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/sp-item.cpp') diff --git a/src/sp-item.cpp b/src/sp-item.cpp index d32fbdef6..55ff60aeb 100644 --- a/src/sp-item.cpp +++ b/src/sp-item.cpp @@ -562,7 +562,7 @@ void SPItem::mask_ref_changed(SPObject *old_mask, SPObject *mask, SPItem *item) } } -void SPItem::update(SPCtx *ctx, guint flags) { +void SPItem::update(SPCtx* /*ctx*/, guint flags) { SPItem *item = this; SPItem* object = item; @@ -688,7 +688,7 @@ Inkscape::XML::Node* SPItem::write(Inkscape::XML::Document *xml_doc, Inkscape::X } // CPPIFY: make pure virtual -Geom::OptRect SPItem::bbox(Geom::Affine const &transform, SPItem::BBoxType type) const { +Geom::OptRect SPItem::bbox(Geom::Affine const & /*transform*/, SPItem::BBoxType /*type*/) const { //throw; return Geom::OptRect(); } @@ -869,7 +869,7 @@ unsigned int SPItem::pos_in_parent() const { } // CPPIFY: make pure virtual, see below! -void SPItem::snappoints(std::vector &p, Inkscape::SnapPreferences const *snapprefs) const { +void SPItem::snappoints(std::vector & /*p*/, Inkscape::SnapPreferences const */*snapprefs*/) const { //throw; } /* This will only be called if the derived class doesn't override this. @@ -919,7 +919,7 @@ void SPItem::getSnappoints(std::vector &p, Inkscap } // CPPIFY: make pure virtual -void SPItem::print(SPPrintContext* ctx) { +void SPItem::print(SPPrintContext* /*ctx*/) { //throw; } @@ -1006,7 +1006,7 @@ unsigned SPItem::display_key_new(unsigned numkeys) } // CPPIFY: make pure virtual -Inkscape::DrawingItem* SPItem::show(Inkscape::Drawing &drawing, unsigned int key, unsigned int flags) { +Inkscape::DrawingItem* SPItem::show(Inkscape::Drawing& /*drawing*/, unsigned int /*key*/, unsigned int /*flags*/) { //throw; return 0; } @@ -1065,7 +1065,7 @@ Inkscape::DrawingItem *SPItem::invoke_show(Inkscape::Drawing &drawing, unsigned } // CPPIFY: make pure virtual -void SPItem::hide(unsigned int key) { +void SPItem::hide(unsigned int /*key*/) { //throw; } @@ -1411,7 +1411,7 @@ void SPItem::doWriteTransform(Inkscape::XML::Node *repr, Geom::Affine const &tra } // CPPIFY: see below, do not make pure? -gint SPItem::event(SPEvent* event) { +gint SPItem::event(SPEvent* /*event*/) { return FALSE; } -- cgit v1.2.3 From 243e788771fab25a6015d8c136307f0a9f9b130c Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Mon, 28 Oct 2013 20:41:27 +0100 Subject: fix crash Fixed bugs: - https://launchpad.net/bugs/854617 (bzr r12742) --- src/sp-item.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/sp-item.cpp') diff --git a/src/sp-item.cpp b/src/sp-item.cpp index 55ff60aeb..c6daa853c 100644 --- a/src/sp-item.cpp +++ b/src/sp-item.cpp @@ -1374,11 +1374,12 @@ void SPItem::doWriteTransform(Inkscape::XML::Node *repr, Geom::Affine const &tra if ( // run the object's set_transform (i.e. embed transform) only if: !preserve && // user did not chose to preserve all transforms - !clip_ref->getObject() && // the object does not have a clippath - !mask_ref->getObject() && // the object does not have a mask + (!clip_ref || !clip_ref->getObject()) && // the object does not have a clippath + (!mask_ref || !mask_ref->getObject()) && // the object does not have a mask !(!transform.isTranslation() && style && style->getFilter()) // the object does not have a filter, or the transform is translation (which is supposed to not affect filters) - ) { - transform_attr = this->set_transform(transform); + ) + { + transform_attr = this->set_transform(transform); if (freeze_stroke_width) { freeze_stroke_width_recursive(false); -- cgit v1.2.3