summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8/ww8par5.cxx
diff options
context:
space:
mode:
authorArkadiy Illarionov <qarkai@gmail.com>2018-08-15 21:32:27 +0300
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-08-20 17:12:11 +0200
commit0787ce8814e37972a0c968f60008d4e8722b6e27 (patch)
tree9d2803ebda8813e6b3f2bc2e6f8a74953b2931c1 /sw/source/filter/ww8/ww8par5.cxx
parentd2c9c60fefb9687adbde4be61ed66a5123a2587f (diff)
Simplify containers iterations, tdf#96099 follow-up
Use range-based loop or replace with std::any_of, std::find and std::find_if where applicable. Change-Id: I2f80788c49d56094c29b102eb96a7a7c079567c6 Reviewed-on: https://gerrit.libreoffice.org/59143 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/filter/ww8/ww8par5.cxx')
-rw-r--r--sw/source/filter/ww8/ww8par5.cxx9
1 files changed, 2 insertions, 7 deletions
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index f0ab52c3b900..9ca995ad4486 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -870,13 +870,8 @@ long SwWW8ImplReader::Read_Field(WW8PLCFManResult* pRes)
bool bNested = false;
if (!m_aFieldStack.empty())
{
- auto aEnd = m_aFieldStack.cend();
- for(auto aIter = m_aFieldStack.cbegin(); aIter != aEnd; ++aIter)
- {
- bNested = !AcceptableNestedField(aIter->mnFieldId);
- if (bNested)
- break;
- }
+ bNested = std::any_of(m_aFieldStack.cbegin(), m_aFieldStack.cend(),
+ [](const WW8FieldEntry& aField) { return !AcceptableNestedField(aField.mnFieldId); });
}
WW8FieldDesc aF;