summaryrefslogtreecommitdiffstats
path: root/src/id-clash.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/id-clash.cpp
parentAvoid creating a new document before opening an old document. (diff)
downloadinkscape-169dff19d4da8d76e69b8e896aa25b0013639c03.tar.gz
inkscape-169dff19d4da8d76e69b8e896aa25b0013639c03.zip
modernize loops
Diffstat (limited to 'src/id-clash.cpp')
-rw-r--r--src/id-clash.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/id-clash.cpp b/src/id-clash.cpp
index 98c693e50..75154391b 100644
--- a/src/id-clash.cpp
+++ b/src/id-clash.cpp
@@ -103,8 +103,7 @@ find_references(SPObject *elem, refmap_type &refmap)
if (!std::strcmp(repr_elem->name(), "inkscape:clipboard")) {
SPCSSAttr *css = sp_repr_css_attr(repr_elem, "style");
if (css) {
- for (unsigned i = 0; i < NUM_CLIPBOARD_PROPERTIES; ++i) {
- const char *attr = clipboard_properties[i];
+ for (auto attr : clipboard_properties) {
const gchar *value = sp_repr_css_property(css, attr, nullptr);
if (value) {
auto uri = extract_uri(value);
@@ -120,8 +119,7 @@ find_references(SPObject *elem, refmap_type &refmap)
}
/* check for xlink:href="#..." and similar */
- for (unsigned i = 0; i < NUM_HREF_LIKE_ATTRIBUTES; ++i) {
- const char *attr = href_like_attributes[i];
+ for (auto attr : href_like_attributes) {
const gchar *val = repr_elem->attribute(attr);
if (val && val[0] == '#') {
std::string id(val+1);
@@ -171,8 +169,7 @@ find_references(SPObject *elem, refmap_type &refmap)
}
/* check for other url(#...) references */
- for (unsigned i = 0; i < NUM_OTHER_URL_PROPERTIES; ++i) {
- const char *attr = other_url_properties[i];
+ for (auto attr : other_url_properties) {
const gchar *value = repr_elem->attribute(attr);
if (value) {
auto uri = extract_uri(value);