summaryrefslogtreecommitdiffstats
path: root/src/style-internal.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/style-internal.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/style-internal.cpp')
-rw-r--r--src/style-internal.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/style-internal.cpp b/src/style-internal.cpp
index 37371e18d..a1c2935be 100644
--- a/src/style-internal.cpp
+++ b/src/style-internal.cpp
@@ -599,8 +599,8 @@ const Glib::ustring
SPIFontVariationSettings::toString() const {
Inkscape::CSSOStringStream os;
- for (auto it=axes.begin(); it!=axes.end(); ++it){
- os << it->first << "=" << it->second << ",";
+ for (const auto & axe : axes){
+ os << axe.first << "=" << axe.second << ",";
}
std::string string = os.str(); // Glib::ustring doesn't have pop_back()
@@ -806,9 +806,9 @@ SPILigatures::read( gchar const *str ) {
} else {
// We need to parse in order
std::vector<Glib::ustring> tokens = Glib::Regex::split_simple("\\s+", str );
- for( unsigned i = 0; i < tokens.size(); ++i ) {
+ for(auto & token : tokens) {
for (unsigned j = 0; enums[j].key; ++j ) {
- if (tokens[i].compare( enums[j].key ) == 0 ) {
+ if (token.compare( enums[j].key ) == 0 ) {
set = true;
inherit = false;
if( enums[j].value < SP_CSS_FONT_VARIANT_LIGATURES_NOCOMMON ) {
@@ -863,9 +863,9 @@ SPINumeric::read( gchar const *str ) {
} else {
// We need to parse in order
std::vector<Glib::ustring> tokens = Glib::Regex::split_simple("\\s+", str );
- for( unsigned i = 0; i < tokens.size(); ++i ) {
+ for(auto & token : tokens) {
for (unsigned j = 0; enums[j].key; ++j ) {
- if (tokens[i].compare( enums[j].key ) == 0 ) {
+ if (token.compare( enums[j].key ) == 0 ) {
set = true;
inherit = false;
value |= enums[j].value;
@@ -945,9 +945,9 @@ SPIEastAsian::read( gchar const *str ) {
} else {
// We need to parse in order
std::vector<Glib::ustring> tokens = Glib::Regex::split_simple("\\s+", str );
- for( unsigned i = 0; i < tokens.size(); ++i ) {
+ for(auto & token : tokens) {
for (unsigned j = 0; enums[j].key; ++j ) {
- if (tokens[i].compare( enums[j].key ) == 0 ) {
+ if (token.compare( enums[j].key ) == 0 ) {
set = true;
inherit = false;