summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorJochen Nitschke <j.nitschke+logerrit@ok.de>2017-07-09 15:28:19 +0200
committerJochen Nitschke <j.nitschke+logerrit@ok.de>2017-07-09 16:49:16 +0200
commitd90293e7ec42eab0ca09f730371599adc466e349 (patch)
tree749ef895ebdbbb6bff02a6e15a675a341779f4a0 /chart2
parenta384e69532bcc6349ecf701ccb204b7d24f3d4e0 (diff)
C++11 replace std::remove_copy_if with std::copy_if
remove_copy_if copies entries for which predicate returns false. since C++11 there is copy_if which copies entries for which predicate returns true. Change-Id: I3ade82f13d27364e2cd35f4286b18128f52f8a5b Reviewed-on: https://gerrit.libreoffice.org/39727 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/tools/DataSeriesHelper.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/chart2/source/tools/DataSeriesHelper.cxx b/chart2/source/tools/DataSeriesHelper.cxx
index 34fd73540e64..f292948cef37 100644
--- a/chart2/source/tools/DataSeriesHelper.cxx
+++ b/chart2/source/tools/DataSeriesHelper.cxx
@@ -230,11 +230,9 @@ std::vector< Reference< chart2::data::XLabeledDataSequence > >
const OUString& aRole, bool bMatchPrefix /* = false */ )
{
std::vector< Reference< chart2::data::XLabeledDataSequence > > aResultVec;
- std::remove_copy_if( aDataSequences.begin(), aDataSequences.end(),
+ std::copy_if( aDataSequences.begin(), aDataSequences.end(),
std::back_inserter( aResultVec ),
- [&aRole, bMatchPrefix](const Reference< chart2::data::XLabeledDataSequence > & xSeq)
- {return !(lcl_MatchesRole(aRole, bMatchPrefix).operator()(xSeq));});
- //TODO replace lambda with std::not_fn(lcl_MatchesRole(aRole, bMatchPrefix) in C++17
+ lcl_MatchesRole(aRole, bMatchPrefix) );
return aResultVec;
}