[Libreoffice-commits] core.git: sc/source
Mike Kaganski (via logerrit)
logerrit at kemper.freedesktop.org
Tue Mar 26 06:32:50 UTC 2019
sc/source/core/data/dpdimsave.cxx | 18 ++----------------
1 file changed, 2 insertions(+), 16 deletions(-)
New commits:
commit 16103cdd8c31b245c79f1fc5c440b15def4492e5
Author: Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Tue Mar 26 06:43:08 2019 +0100
Commit: Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Tue Mar 26 07:32:28 2019 +0100
No need in function object; just use range-based loop
Change-Id: I08289c35eb1e8babc53406deb25df39f68a0dd88
Reviewed-on: https://gerrit.libreoffice.org/69726
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
diff --git a/sc/source/core/data/dpdimsave.cxx b/sc/source/core/data/dpdimsave.cxx
index ef7be61cc821..994b2d7bd0fb 100644
--- a/sc/source/core/data/dpdimsave.cxx
+++ b/sc/source/core/data/dpdimsave.cxx
@@ -621,24 +621,10 @@ void ScDPDimensionSaveData::WriteToData( ScDPGroupTableData& rData ) const
rEntry.second.AddToData( rData );
}
-namespace {
-
-class AddGroupDimToCache
-{
- ScDPCache& mrCache;
-public:
- explicit AddGroupDimToCache(ScDPCache& rCache) : mrCache(rCache) {}
- void operator() (const ScDPSaveGroupDimension& rDim)
- {
- rDim.AddToCache(mrCache);
- }
-};
-
-}
-
void ScDPDimensionSaveData::WriteToCache(ScDPCache& rCache) const
{
- std::for_each(maGroupDims.begin(), maGroupDims.end(), AddGroupDimToCache(rCache));
+ for (const auto& rEntry : maGroupDims)
+ rEntry.AddToCache(rCache);
for (const auto& rEntry : maNumGroupDims)
rEntry.second.AddToCache(rCache);
}
More information about the Libreoffice-commits
mailing list