diff options
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 { |
