Mod: use empty

This commit is contained in:
berniev
2022-08-06 02:29:31 +10:00
committed by wwmayer
parent 22dcf5866f
commit 53ba98d636
134 changed files with 419 additions and 419 deletions

View File

@@ -169,7 +169,7 @@ void Workbench::setupContextMenu(const char* recipient, Gui::MenuItem* item) con
{
auto selection = Gui::Selection().getSelection();
// Add move Tip Command
if ( selection.size () >= 1 ) {
if ( !selection.empty() ) {
App::DocumentObject *feature = selection.front().pObject;
PartDesign::Body *body = nullptr;
@@ -194,7 +194,7 @@ void Workbench::setupContextMenu(const char* recipient, Gui::MenuItem* item) con
Gui::MDIView *activeView = Gui::Application::Instance->activeView();
if ( selection.size () > 0 && activeView ) {
if ( !selection.empty() && activeView ) {
bool docHaveBodies = activeView->getAppDocument()->countObjectsOfType (
PartDesign::Body::getClassTypeId () ) > 0;