diff options
author | Neil <nyamatongwe@gmail.com> | 2017-04-09 16:55:17 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2017-04-09 16:55:17 +1000 |
commit | da34a05d99e324ffc3ca802ca9d65db2a4e7eac9 (patch) | |
tree | c0a586a232d664f3252e697fa98d840993490f3f /src/XPM.cxx | |
parent | 1b763e30f00b6f03d506bf1e1fa0c6cb5264205e (diff) | |
download | scintilla-mirror-da34a05d99e324ffc3ca802ca9d65db2a4e7eac9.tar.gz |
Further use of range-for.
Diffstat (limited to 'src/XPM.cxx')
-rw-r--r-- | src/XPM.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/XPM.cxx b/src/XPM.cxx index 0e5795cc5..c3b36c7ff 100644 --- a/src/XPM.cxx +++ b/src/XPM.cxx @@ -282,9 +282,9 @@ RGBAImage *RGBAImageSet::Get(int ident) { /// Give the largest height of the set. int RGBAImageSet::GetHeight() const { if (height < 0) { - for (ImageMap::const_iterator it=images.begin(); it != images.end(); ++it) { - if (height < it->second->GetHeight()) { - height = it->second->GetHeight(); + for (const std::pair<int, RGBAImage*> &image : images) { + if (height < image.second->GetHeight()) { + height = image.second->GetHeight(); } } } @@ -294,9 +294,9 @@ int RGBAImageSet::GetHeight() const { /// Give the largest width of the set. int RGBAImageSet::GetWidth() const { if (width < 0) { - for (ImageMap::const_iterator it=images.begin(); it != images.end(); ++it) { - if (width < it->second->GetWidth()) { - width = it->second->GetWidth(); + for (const std::pair<int, RGBAImage*> &image : images) { + if (width < image.second->GetWidth()) { + width = image.second->GetWidth(); } } } |