diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2017-10-02 21:03:21 +0200 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2017-10-02 21:06:04 +0200 |
commit | 62d542e9b1bb1b442562951d21100fd61be5f0c7 (patch) | |
tree | 866c33719243c2f0a2c58d3da22071f93348f5e6 /sc | |
parent | 0fd2e787974853b48c54ed7a165ee7edda80af64 (diff) |
Remove undefined elements after std::unique
Change-Id: Ifebd1124fa081d50797904175d90e6d26d50ab7f
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/docshell/macromgr.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sc/source/ui/docshell/macromgr.cxx b/sc/source/ui/docshell/macromgr.cxx index 29e66cc5f1ab..4cb5e41403f8 100644 --- a/sc/source/ui/docshell/macromgr.cxx +++ b/sc/source/ui/docshell/macromgr.cxx @@ -77,7 +77,9 @@ public: // Remove duplicates. std::sort(rCellList.begin(), rCellList.end()); - std::unique(rCellList.begin(), rCellList.end()); + auto last = std::unique(rCellList.begin(), rCellList.end()); + rCellList.erase(last, rCellList.end()); + // exception safe copy vector<ScFormulaCell*> temp(rCellList); rCells.swap(temp); |