diff options
author | Arkadiy Illarionov <qarkai@gmail.com> | 2019-06-15 17:13:48 +0300 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-06-18 09:43:08 +0200 |
commit | 452a8e4abe0c416d664078baddff67c1561025ec (patch) | |
tree | 037f973aebd5e740d97525ff7aa852515762ae0b /vcl/workben/vcldemo.cxx | |
parent | e1eb7cb04a4c30cec238ab0f54d41a6cdc3299c1 (diff) |
Simplify Sequence iterations in vcl
Use range-based loops or replace with comphelper or STL functions
Change-Id: If046738084c2d13cc1eaea6a03aaf60b63f62767
Reviewed-on: https://gerrit.libreoffice.org/74104
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/workben/vcldemo.cxx')
-rw-r--r-- | vcl/workben/vcldemo.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx index b9e4f26af815..befde4053660 100644 --- a/vcl/workben/vcldemo.cxx +++ b/vcl/workben/vcldemo.cxx @@ -1222,12 +1222,12 @@ public: css::uno::Reference<css::container::XNameAccess> xRef(ImageTree::get().getNameAccess()); css::uno::Sequence< OUString > aAllIcons = xRef->getElementNames(); - for (sal_Int32 i = 0; i < aAllIcons.getLength(); i++) + for (const auto& rIcon : aAllIcons) { - if (aAllIcons[i].endsWithIgnoreAsciiCase("svg")) + if (rIcon.endsWithIgnoreAsciiCase("svg")) continue; // too slow to load. - maIconNames.push_back(aAllIcons[i]); - maIcons.emplace_back(aAllIcons[i]); + maIconNames.push_back(rIcon); + maIcons.emplace_back(rIcon); } } |