From 0787ce8814e37972a0c968f60008d4e8722b6e27 Mon Sep 17 00:00:00 2001 From: Arkadiy Illarionov Date: Wed, 15 Aug 2018 21:32:27 +0300 Subject: 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 Reviewed-by: Noel Grandin --- sw/source/filter/ww8/wrtw8sty.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'sw/source/filter/ww8/wrtw8sty.cxx') diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx index dc57e91f6c5f..5b6fda114083 100644 --- a/sw/source/filter/ww8/wrtw8sty.cxx +++ b/sw/source/filter/ww8/wrtw8sty.cxx @@ -892,9 +892,8 @@ std::vector< const wwFont* > wwFontHelper::AsVector() const { std::vector aFontList( maFonts.size() ); - auto aEnd = maFonts.cend(); - for ( auto aIter = maFonts.cbegin(); aIter != aEnd; ++aIter ) - aFontList[aIter->second] = &aIter->first; + for ( const auto& aFont : maFonts ) + aFontList[aFont.second] = &aFont.first; return aFontList; } -- cgit