summaryrefslogtreecommitdiffstats
path: root/sc/source/core/data/colcontainer.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/core/data/colcontainer.cxx')
-rw-r--r--sc/source/core/data/colcontainer.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/sc/source/core/data/colcontainer.cxx b/sc/source/core/data/colcontainer.cxx
index f6ef8ff7da..a0a9d84577 100644
--- a/sc/source/core/data/colcontainer.cxx
+++ b/sc/source/core/data/colcontainer.cxx
@@ -47,10 +47,9 @@ void ScColContainer::Clear()
void ScColContainer::resize( ScSheetLimits const & rSheetLimits, const size_t aNewColSize )
{
size_t aOldColSize = aCols.size();
- if (aNewColSize > aCols.capacity())
- aCols.reserve( aNewColSize );
+ aCols.resize( aNewColSize );
for ( size_t nCol = aOldColSize; nCol < aNewColSize; ++nCol )
- aCols.emplace_back(new ScColumn(rSheetLimits));
+ aCols[nCol].reset(new ScColumn(rSheetLimits));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */