diff options
| author | Markus Engel <markus.engel@tum.de> | 2013-10-26 22:00:51 +0000 |
|---|---|---|
| committer | Markus Engel <markus.engel@tum.de> | 2013-10-26 22:00:51 +0000 |
| commit | 73edade30f70b4c0ad94c9561b4e4ec0675465b0 (patch) | |
| tree | de55f48e427afc5faf8fb97467a8f79b86820b0f /src/sp-use.cpp | |
| parent | fix crash (diff) | |
| download | inkscape-73edade30f70b4c0ad94c9561b4e4ec0675465b0.tar.gz inkscape-73edade30f70b4c0ad94c9561b4e4ec0675465b0.zip | |
Added some consts.
(bzr r12729)
Diffstat (limited to 'src/sp-use.cpp')
| -rw-r--r-- | src/sp-use.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/sp-use.cpp b/src/sp-use.cpp index ec367d786..b2a51b8d9 100644 --- a/src/sp-use.cpp +++ b/src/sp-use.cpp @@ -178,7 +178,7 @@ Inkscape::XML::Node* SPUse::write(Inkscape::XML::Document *xml_doc, Inkscape::XM return repr; } -Geom::OptRect SPUse::bbox(Geom::Affine const &transform, SPItem::BBoxType bboxtype) { +Geom::OptRect SPUse::bbox(Geom::Affine const &transform, SPItem::BBoxType bboxtype) const { Geom::OptRect bbox; if (this->child) { @@ -208,7 +208,7 @@ void SPUse::print(SPPrintContext* ctx) { } } -const char* SPUse::displayName() { +const char* SPUse::displayName() const { if (this->child && SP_IS_SYMBOL( this->child )) { return _("Symbol"); } @@ -216,7 +216,7 @@ const char* SPUse::displayName() { return _("Clone"); } -gchar* SPUse::description() { +gchar* SPUse::description() const { if (this->child) { if( SP_IS_SYMBOL( this->child ) ) { return g_strdup_printf(_("called %s"), this->child->title()); @@ -295,6 +295,10 @@ SPItem *SPUse::root() { return orig; } +SPItem const *SPUse::root() const { + return const_cast<SPUse*>(this)->root(); +} + /** * Returns the effective transform that goes from the ultimate original to given SPUse, both ends * included. @@ -652,8 +656,8 @@ SPItem *SPUse::get_original() { return ref; } -void SPUse::snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs) { - SPItem *root = this->root(); +void SPUse::snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs) const { + SPItem const *root = this->root(); if (!root) { return; |
