use emplace_back instead of push_back where justified

This commit is contained in:
asapelkin
2019-10-25 00:57:12 +03:00
committed by wmayer
parent 079808b816
commit e951094af9
67 changed files with 239 additions and 241 deletions

View File

@@ -812,8 +812,8 @@ void CmdSpreadsheetSetAlias::activated(int iMsg)
if (selection.size() == 1) {
std::vector<Range> range;
range.push_back(Range(selection[0].row(), selection[0].column(),
selection[0].row(), selection[0].column()));
range.emplace_back(selection[0].row(), selection[0].column(),
selection[0].row(), selection[0].column());
std::unique_ptr<PropertiesDialog> dialog(new PropertiesDialog(sheet, range, sheetView));

View File

@@ -137,8 +137,8 @@ std::vector<Range> SheetTableView::selectedRanges() const
std::pair<int, int> ul = (*i).first;
std::pair<int, int> size = (*i).second;
result.push_back(Range(ul.first, ul.second,
ul.first + size.first - 1, ul.second + size.second - 1));
result.emplace_back(ul.first, ul.second,
ul.first + size.first - 1, ul.second + size.second - 1);
}
return result;