summaryrefslogtreecommitdiffstats
path: root/src/document.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/document.cpp')
-rw-r--r--src/document.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/document.cpp b/src/document.cpp
index 753de44da..a2d7a32cb 100644
--- a/src/document.cpp
+++ b/src/document.cpp
@@ -234,8 +234,8 @@ Persp3D *SPDocument::getCurrentPersp3D() {
// Check if current_persp3d is still valid
std::vector<Persp3D*> plist;
getPerspectivesInDefs(plist);
- for (unsigned int i = 0; i < plist.size(); ++i) {
- if (current_persp3d == plist[i])
+ for (auto & i : plist) {
+ if (current_persp3d == i)
return current_persp3d;
}
@@ -1839,8 +1839,8 @@ void SPDocument::importDefs(SPDocument *source)
prevent_id_clashes(source, this);
- for (std::vector<Inkscape::XML::Node const *>::iterator defs = defsNodes.begin(); defs != defsNodes.end(); ++defs) {
- importDefsNode(source, const_cast<Inkscape::XML::Node *>(*defs), target_defs);
+ for (auto & defsNode : defsNodes) {
+ importDefsNode(source, const_cast<Inkscape::XML::Node *>(defsNode), target_defs);
}
}