diff options
author | Arkadiy Illarionov <qarkai@gmail.com> | 2018-10-14 12:00:03 +0300 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-14 17:30:32 +0200 |
commit | 19be86249dcc5b13b3c95f5469600fa2bc1b749b (patch) | |
tree | e1468590650eea60e3897a8cb8b7c36bb9ab996b /vcl/workben | |
parent | 7758115d15ded2afd81946df0865ecc831b179aa (diff) |
Simplify containers iterations in vcl
Use range-based loop or replace with STL functions.
Change-Id: Ide2f89194238ae6a1f21e8132e2297710d9e6dcd
Reviewed-on: https://gerrit.libreoffice.org/61756
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/workben')
-rw-r--r-- | vcl/workben/vcldemo.cxx | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx index 9b9b088e9b94..6b2db288d87d 100644 --- a/vcl/workben/vcldemo.cxx +++ b/vcl/workben/vcldemo.cxx @@ -1504,14 +1504,9 @@ public: void addInvalidate(vcl::Window *pWindow) { maInvalidates.emplace_back(pWindow); }; void removeInvalidate(vcl::Window *pWindow) { - for (auto aIt = maInvalidates.begin(); aIt != maInvalidates.end(); ++aIt) - { - if (*aIt == pWindow) - { - maInvalidates.erase(aIt); - return; - } - } + auto aIt = std::find(maInvalidates.begin(), maInvalidates.end(), pWindow); + if (aIt != maInvalidates.end()) + maInvalidates.erase(aIt); } void Invalidate() { |