summaryrefslogtreecommitdiff
path: root/sfx2/source/doc/docfac.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/doc/docfac.cxx')
-rw-r--r--sfx2/source/doc/docfac.cxx7
1 files changed, 2 insertions, 5 deletions
diff --git a/sfx2/source/doc/docfac.cxx b/sfx2/source/doc/docfac.cxx
index 94205215ea51..ba045e50b803 100644
--- a/sfx2/source/doc/docfac.cxx
+++ b/sfx2/source/doc/docfac.cxx
@@ -110,11 +110,8 @@ void SfxObjectFactory::RegisterViewFactory
}
}
#endif
- SfxViewFactoryArr_Impl::iterator it = pImpl->aViewFactoryArr.begin();
- for ( ; it != pImpl->aViewFactoryArr.end() &&
- (*it)->GetOrdinal() <= rFactory.GetOrdinal();
- ++it )
- /* empty loop */;
+ auto it = std::find_if(pImpl->aViewFactoryArr.begin(), pImpl->aViewFactoryArr.end(),
+ [&rFactory](SfxViewFactory* pFactory) { return pFactory->GetOrdinal() > rFactory.GetOrdinal(); });
pImpl->aViewFactoryArr.insert(it, &rFactory);
}