summaryrefslogtreecommitdiffstats
path: root/src/document.cpp
diff options
context:
space:
mode:
authorMarc Jeanmougin <marc@jeanmougin.fr>2019-01-02 09:41:30 +0000
committerMarc Jeanmougin <marc@jeanmougin.fr>2019-01-02 09:41:30 +0000
commit169dff19d4da8d76e69b8e896aa25b0013639c03 (patch)
treea0c070fa95188b5cde708ac285e6a2db9df4a83f /src/document.cpp
parentAvoid creating a new document before opening an old document. (diff)
downloadinkscape-169dff19d4da8d76e69b8e896aa25b0013639c03.tar.gz
inkscape-169dff19d4da8d76e69b8e896aa25b0013639c03.zip
modernize loops
Diffstat (limited to '')
-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);
}
}