diff options
| author | Ted Gould <ted@gould.cx> | 2016-08-12 04:11:03 +0000 |
|---|---|---|
| committer | Ted Gould <ted@gould.cx> | 2016-08-12 04:11:03 +0000 |
| commit | ff848ebc9919d158c3ec3d7420e72b6aca99a3ea (patch) | |
| tree | 030ab171865d0ed7f6bae3ef68315639cdb2622b /src/uri-references.cpp | |
| parent | Merging 0.92.x branch (diff) | |
| parent | CloneTiler: Further C++ification (diff) | |
| download | inkscape-ff848ebc9919d158c3ec3d7420e72b6aca99a3ea.tar.gz inkscape-ff848ebc9919d158c3ec3d7420e72b6aca99a3ea.zip | |
Merge trunk
(bzr r14950.1.20)
Diffstat (limited to 'src/uri-references.cpp')
| -rw-r--r-- | src/uri-references.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/uri-references.cpp b/src/uri-references.cpp index db46a156f..07f2d168b 100644 --- a/src/uri-references.cpp +++ b/src/uri-references.cpp @@ -12,7 +12,6 @@ #include <iostream> #include <cstring> -#include <string> #include "document.h" #include "sp-object.h" @@ -21,7 +20,6 @@ #include "extract-uri.h" #include "sp-tag-use.h" #include <glibmm/miscutils.h> -#include <sigc++/functors/mem_fun.h> namespace Inkscape { @@ -76,10 +74,11 @@ bool URIReference::_acceptObject(SPObject *obj) const std::vector<int> positions; while (owner->cloned) { int position = 0; - SPObject *c = owner->parent->firstChild(); - while (c != owner && dynamic_cast<SPObject *>(c)) { + for (auto &child: owner->parent->children) { + if(&child == owner) { + break; + } position++; - c = c->next; } positions.push_back(position); owner = owner->parent; @@ -92,7 +91,7 @@ bool URIReference::_acceptObject(SPObject *obj) const g_warning("cloned object with no known type\n"); return false; } - for (int i = positions.size() - 2; i >= 0; i--) + for (int i = (int) (positions.size() - 2); i >= 0; i--) owner = owner->childList(false)[positions[i]]; } // once we have the "original" object (hopefully) we look at who is referencing it |
