summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-01-14 17:20:42 +0100
committerStephan Bergmann <sbergman@redhat.com>2013-01-14 17:21:02 +0100
commit34d63e34d9f65ce83564ac310c5857d17147e27f (patch)
treeae94e7d56e9c6cfd0405d2dc5219353ddacdaf91 /desktop
parente19242c377aa548173e75b57f01108972194f1db (diff)
Use std::back_inserter
Change-Id: If87f96b5c616ee6ec70de6aa7f2a58c044f04f3a
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/migration/migration.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx
index 82f573f15c10..9005d20f9bbb 100644
--- a/desktop/source/migration/migration.cxx
+++ b/desktop/source/migration/migration.cxx
@@ -20,6 +20,7 @@
#include "sal/config.h"
#include <algorithm>
+#include <iterator>
#include <map>
#include <new>
#include <set>
@@ -712,10 +713,8 @@ strings_v subtract(strings_v const & va, strings_v const & vb) {
strings_v b(vb);
std::sort(b.begin(), b.end());
strings_v::iterator be(std::unique(b.begin(), b.end()));
- strings_v c(ae - a.begin());
- strings_v::iterator ce(
- std::set_difference(a.begin(), ae, b.begin(), be, c.begin()));
- c.resize(ce - c.begin());
+ strings_v c;
+ std::set_difference(a.begin(), ae, b.begin(), be, std::back_inserter(c));
return c;
}