[skip ci] fix more -Wgnu-zero-variadic-macro-arguments

This commit is contained in:
wmayer
2019-11-17 19:11:08 +01:00
parent a3e88a399f
commit c0d58b8f3e
12 changed files with 529 additions and 611 deletions

View File

@@ -39,7 +39,7 @@
#include <Base/Tools.h>
#include <Gui/Application.h>
#include <Gui/BitmapFactory.h>
#include <Gui/Command.h>
#include <Gui/CommandT.h>
#include <Gui/Document.h>
#include <Gui/Macro.h>
#include <Gui/MainWindow.h>
@@ -407,10 +407,8 @@ void DrawSketchHandler::createAutoConstraints(const std::vector<AutoConstraint>
if (posId1 == Sketcher::none)
continue;
// If the auto constraint has a point create a coincident otherwise it is an edge on a point
FCMD_OBJ_CMD2("addConstraint(Sketcher.Constraint('Coincident',%i,%i,%i,%i)) "
,sketchgui->getObject()
,geoId1, posId1, it->GeoId, it->PosId
);
Gui::cmdAppObjectArgs(sketchgui->getObject(), "addConstraint(Sketcher.Constraint('Coincident',%i,%i,%i,%i)) "
, geoId1, posId1, it->GeoId, it->PosId);
} break;
case Sketcher::PointOnObject: {
int geoId2 = it->GeoId;
@@ -421,26 +419,14 @@ void DrawSketchHandler::createAutoConstraints(const std::vector<AutoConstraint>
std::swap(posId1,posId2);
}
FCMD_OBJ_CMD2("addConstraint(Sketcher.Constraint('PointOnObject',%i,%i,%i)) "
,sketchgui->getObject()
,geoId1, posId1, geoId2
);
Gui::cmdAppObjectArgs(sketchgui->getObject(), "addConstraint(Sketcher.Constraint('PointOnObject',%i,%i,%i)) "
, geoId1, posId1, geoId2);
} break;
case Sketcher::Horizontal: {
FCMD_OBJ_CMD2("addConstraint(Sketcher.Constraint('Horizontal',%i)) "
,sketchgui->getObject()
,geoId1
);
Gui::cmdAppObjectArgs(sketchgui->getObject(), "addConstraint(Sketcher.Constraint('Horizontal',%i)) ", geoId1);
} break;
case Sketcher::Vertical: {
FCMD_OBJ_CMD2("addConstraint(Sketcher.Constraint('Vertical',%i)) "
,sketchgui->getObject()
,geoId1
);
Gui::cmdAppObjectArgs(sketchgui->getObject(), "addConstraint(Sketcher.Constraint('Vertical',%i)) ", geoId1);
} break;
case Sketcher::Tangent: {
Sketcher::SketchObject* Obj = static_cast<Sketcher::SketchObject*>(sketchgui->getObject());
@@ -496,10 +482,8 @@ void DrawSketchHandler::createAutoConstraints(const std::vector<AutoConstraint>
}
}
FCMD_OBJ_CMD2("addConstraint(Sketcher.Constraint('Tangent',%i, %i)) "
,sketchgui->getObject()
,geoId1, it->GeoId
);
Gui::cmdAppObjectArgs(sketchgui->getObject(), "addConstraint(Sketcher.Constraint('Tangent',%i, %i)) "
, geoId1, it->GeoId);
} break;
default:
break;