diff options
| author | Marc Jeanmougin <marc@jeanmougin.fr> | 2019-01-02 09:41:30 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <marc@jeanmougin.fr> | 2019-01-02 09:41:30 +0000 |
| commit | 169dff19d4da8d76e69b8e896aa25b0013639c03 (patch) | |
| tree | a0c070fa95188b5cde708ac285e6a2db9df4a83f /src/unicoderange.cpp | |
| parent | Avoid creating a new document before opening an old document. (diff) | |
| download | inkscape-169dff19d4da8d76e69b8e896aa25b0013639c03.tar.gz inkscape-169dff19d4da8d76e69b8e896aa25b0013639c03.zip | |
modernize loops
Diffstat (limited to 'src/unicoderange.cpp')
| -rw-r--r-- | src/unicoderange.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/unicoderange.cpp b/src/unicoderange.cpp index a6137f640..ca1a3f67c 100644 --- a/src/unicoderange.cpp +++ b/src/unicoderange.cpp @@ -70,8 +70,8 @@ int UnicodeRange::add_range(gchar* val){ } bool UnicodeRange::contains(gchar unicode){ - for(unsigned int i=0;i<this->unichars.size();i++){ - if (static_cast<gunichar>(unicode) == this->unichars[i]){ + for(unsigned int unichar : this->unichars){ + if (static_cast<gunichar>(unicode) == unichar){ return true; } } @@ -88,8 +88,7 @@ bool UnicodeRange::contains(gchar unicode){ } bool found; - for(unsigned int i=0;i<this->range.size();i++){ - Urange r = this->range[i]; + for(auto r : this->range){ if (r.end){ if (unival >= hex2int(r.start) && unival <= hex2int(r.end)) return true; } else { |
