diff --git a/aegisub/src/base_grid.cpp b/aegisub/src/base_grid.cpp index b9d4d2a14..f88298eb5 100644 --- a/aegisub/src/base_grid.cpp +++ b/aegisub/src/base_grid.cpp @@ -345,7 +345,8 @@ int BaseGrid::GetFirstSelRow() const { } wxArrayInt BaseGrid::GetSelection() const { - wxArrayInt res(selection.size()); + wxArrayInt res; + res.reserve(selection.size()); transform(selection.begin(), selection.end(), std::back_inserter(res), bind(&BaseGrid::GetDialogueIndex, this, std::tr1::placeholders::_1)); std::sort(res.begin(), res.end());