From e567694246d99a2a99c4079b04ed2ad8cd5ed785 Mon Sep 17 00:00:00 2001 From: Julien Nabet Date: Sun, 5 Nov 2017 08:39:47 +0100 Subject: Remove GetNextSubset and create GetSubsetMap To avoid to store an iterator and simplify loops Change-Id: I9b160714125176841961a56905d81dcb876c68b6 Reviewed-on: https://gerrit.libreoffice.org/44326 Tested-by: Jenkins Reviewed-by: Julien Nabet --- desktop/source/lib/init.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'desktop/source') diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 906e271f5c30..96b6ab2e2399 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -2525,10 +2525,10 @@ static char* getFontSubset (const OString& aFontName) aDevice->GetFontCharMap(xFontCharMap); SubsetMap aSubMap(xFontCharMap); - for(const Subset* pItSub = aSubMap.GetNextSubset(true); pItSub; pItSub = aSubMap.GetNextSubset(false)) + for (auto const& subset : aSubMap.GetSubsetMap()) { boost::property_tree::ptree aChild; - aChild.put("", static_cast(ublock_getCode(pItSub->GetRangeMin()))); + aChild.put("", static_cast(ublock_getCode(subset.GetRangeMin()))); aValues.push_back(std::make_pair("", aChild)); } } -- cgit