summaryrefslogtreecommitdiff
path: root/vcl/workben
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/workben')
-rw-r--r--vcl/workben/vcldemo.cxx11
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()
{