Mod: use empty
This commit is contained in:
@@ -87,7 +87,7 @@ TaskFemConstraintSpring::TaskFemConstraintSpring(ViewProviderFemConstraintSpring
|
||||
for (std::size_t i = 0; i < Objects.size(); i++) {
|
||||
ui->lw_references->addItem(makeRefText(Objects[i], SubElements[i]));
|
||||
}
|
||||
if (Objects.size() > 0) {
|
||||
if (!Objects.empty()) {
|
||||
ui->lw_references->setCurrentRow(0, QItemSelectionModel::ClearAndSelect);
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ void TaskFemConstraintSpring::updateUI()
|
||||
void TaskFemConstraintSpring::addToSelection()
|
||||
{
|
||||
std::vector<Gui::SelectionObject> selection = Gui::Selection().getSelectionEx(); //gets vector of selected objects of active document
|
||||
if (selection.size() == 0) {
|
||||
if (selection.empty()) {
|
||||
QMessageBox::warning(this, tr("Selection error"), tr("Nothing selected!"));
|
||||
return;
|
||||
}
|
||||
@@ -162,7 +162,7 @@ void TaskFemConstraintSpring::addToSelection()
|
||||
void TaskFemConstraintSpring::removeFromSelection()
|
||||
{
|
||||
std::vector<Gui::SelectionObject> selection = Gui::Selection().getSelectionEx(); //gets vector of selected objects of active document
|
||||
if (selection.size() == 0) {
|
||||
if (selection.empty()) {
|
||||
QMessageBox::warning(this, tr("Selection error"), tr("Nothing selected!"));
|
||||
return;
|
||||
}
|
||||
@@ -190,7 +190,7 @@ void TaskFemConstraintSpring::removeFromSelection()
|
||||
}
|
||||
}
|
||||
std::sort(itemsToDel.begin(), itemsToDel.end());
|
||||
while (itemsToDel.size() > 0) {
|
||||
while (!itemsToDel.empty()) {
|
||||
Objects.erase(Objects.begin() + itemsToDel.back());
|
||||
SubElements.erase(SubElements.begin() + itemsToDel.back());
|
||||
itemsToDel.pop_back();
|
||||
|
||||
Reference in New Issue
Block a user