diff options
Diffstat (limited to 'sfx2/source/appl/linksrc.cxx')
-rw-r--r-- | sfx2/source/appl/linksrc.cxx | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sfx2/source/appl/linksrc.cxx b/sfx2/source/appl/linksrc.cxx index 16a94bad6abd..98c347713dfb 100644 --- a/sfx2/source/appl/linksrc.cxx +++ b/sfx2/source/appl/linksrc.cxx @@ -99,12 +99,10 @@ public: void DeleteAndDestroy(SvLinkSource_Entry_Impl const * p) { - for (auto it = mvData.begin(); it != mvData.end(); ++it) - if (it->get() == p) - { - mvData.erase(it); - break; - } + auto it = std::find_if(mvData.begin(), mvData.end(), + [&p](const std::unique_ptr<SvLinkSource_Entry_Impl>& rxData) { return rxData.get() == p; }); + if (it != mvData.end()) + mvData.erase(it); } }; |