Gui: use empty

This commit is contained in:
berniev
2022-08-06 03:13:53 +10:00
committed by wwmayer
parent a00faca147
commit d88729d2c4
33 changed files with 154 additions and 154 deletions

View File

@@ -450,7 +450,7 @@ static void linkConvert(bool unlink) {
if(obj)
recomputes.push_back(obj);
}
if(recomputes.size())
if(!recomputes.empty())
recomputes.front()->getDocument()->recompute(recomputes);
Command::commitCommand();
@@ -726,7 +726,7 @@ static App::DocumentObject *getSelectedLink(bool finalLink, std::string *subname
if(found) {
linked = sels[0].pObject;
*subname = prefix.size()?prefix:prefix2 + *subname;
*subname = !prefix.empty()?prefix:prefix2 + *subname;
}
}
@@ -747,7 +747,7 @@ void StdCmdLinkSelectLinked::activated(int)
}
Selection().selStackPush();
Selection().clearCompleteSelection();
if(subname.size()) {
if(!subname.empty()) {
Selection().addSelection(linked->getDocument()->getName(),linked->getNameInDocument(),subname.c_str());
auto doc = Application::Instance->getDocument(linked->getDocument());
if(doc) {