Mod: Fix several compiler warnings
This commit is contained in:
@@ -183,8 +183,6 @@ void DlgInspectAppearance::update(std::vector<Gui::ViewProvider*>& views)
|
||||
auto& material = (prop->getValues())[index];
|
||||
auto* tab = makeAppearanceTab(material);
|
||||
ui->tabAppearance->addTab(tab, QString::number(index));
|
||||
|
||||
index++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -901,19 +901,21 @@ private:
|
||||
pcDoc->recompute();
|
||||
return Py::asObject(pcFeature->getPyObject());
|
||||
#else
|
||||
App::Document *pcSrcDoc = nullptr;
|
||||
TopoShape shape;
|
||||
if (PyObject_TypeCheck(pcObj, &TopoShapePy::Type))
|
||||
if (PyObject_TypeCheck(pcObj, &TopoShapePy::Type)) {
|
||||
shape = *static_cast<TopoShapePy*>(pcObj)->getTopoShapePtr();
|
||||
else if (PyObject_TypeCheck(pcObj, &GeometryPy::Type))
|
||||
}
|
||||
else if (PyObject_TypeCheck(pcObj, &GeometryPy::Type)) {
|
||||
shape = static_cast<GeometryPy*>(pcObj)->getGeometryPtr()->toShape();
|
||||
}
|
||||
else if (PyObject_TypeCheck(pcObj, &App::DocumentObjectPy::Type)) {
|
||||
auto obj = static_cast<App::DocumentObjectPy*>(pcObj)->getDocumentObjectPtr();
|
||||
pcSrcDoc = obj->getDocument();
|
||||
shape = Feature::getTopoShape(obj);
|
||||
}
|
||||
else
|
||||
else {
|
||||
throw Py::TypeError("Expects argument of type DocumentObject, Shape, or Geometry");
|
||||
}
|
||||
|
||||
Part::Feature *pcFeature = static_cast<Part::Feature*>(pcDoc->addObject("Part::Feature", name));
|
||||
// copy the data
|
||||
pcFeature->Shape.setValue(shape);
|
||||
|
||||
@@ -689,6 +689,7 @@ void TopoShape::copyElementMap(const TopoShape& topoShape, const char* op)
|
||||
setMappedChildElements(children);
|
||||
}
|
||||
|
||||
#ifndef FC_USE_TNP_FIX
|
||||
namespace
|
||||
{
|
||||
void warnIfLogging()
|
||||
@@ -722,7 +723,7 @@ void checkAndMatchHasher(TopoShape& topoShape1, const TopoShape& topoShape2)
|
||||
}
|
||||
}
|
||||
} // namespace
|
||||
|
||||
#endif
|
||||
|
||||
// TODO: Refactor mapSubElementTypeForShape to reduce complexity
|
||||
void TopoShape::mapSubElementTypeForShape(const TopoShape& other,
|
||||
@@ -4454,7 +4455,7 @@ TopoShape& TopoShape::makeElementRevolve(const TopoShape& _base,
|
||||
|
||||
TopoShape& TopoShape::makeElementRevolution(const TopoShape& _base,
|
||||
const gp_Ax1& axis,
|
||||
double d,
|
||||
[[maybe_unused]]double d,
|
||||
const TopoDS_Face& supportface,
|
||||
const TopoDS_Face& uptoface,
|
||||
const char* face_maker,
|
||||
|
||||
@@ -194,7 +194,6 @@ App::DocumentObjectExecReturn* Revolution::execute()
|
||||
if (!Ex.More()) {
|
||||
supportface = TopoDS_Face();
|
||||
}
|
||||
RevolMode mode = RevolMode::None;
|
||||
#ifdef FC_USE_TNP_FIX
|
||||
// revolve the face to a solid
|
||||
// TopoShape result(0);
|
||||
@@ -205,6 +204,7 @@ App::DocumentObjectExecReturn* Revolution::execute()
|
||||
return new App::DocumentObjectExecReturn("Could not revolve the sketch!");
|
||||
}
|
||||
#else
|
||||
RevolMode mode = RevolMode::None;
|
||||
generateRevolution(result,
|
||||
base.getShape(),
|
||||
sketchshape.getShape(),
|
||||
|
||||
@@ -218,9 +218,8 @@ void QGIDatumLabel::snapPosition(QPointF& pos)
|
||||
else if (type == "DistanceY") {
|
||||
ip2 = Base::Vector2d(ip1.x, ip2.y);
|
||||
}
|
||||
Base::Vector2d imid = (ip1 + ip2) * 0.5;
|
||||
|
||||
Base::Vector2d idir = ip2 - ip1;
|
||||
Base::Vector2d inormal = Base::Vector2d(-idir.y, idir.x);
|
||||
|
||||
if (type == "Distance" && fabs(dir.x * idir.y - dir.y * idir.x) > Precision::Confusion()) {
|
||||
//dimensions not parallel
|
||||
@@ -2222,6 +2221,10 @@ void QGIViewDimension::drawAreaExecutive(const Base::Vector2d& centerPoint, doub
|
||||
double centerOverhang, int standardStyle,
|
||||
int renderExtent, bool flipArrow) const
|
||||
{
|
||||
Q_UNUSED(area)
|
||||
Q_UNUSED(centerOverhang)
|
||||
Q_UNUSED(renderExtent)
|
||||
|
||||
QPainterPath areaPath;
|
||||
|
||||
Base::Vector2d labelCenter(labelRectangle.GetCenter());
|
||||
@@ -2718,9 +2721,6 @@ void QGIViewDimension::drawArea(TechDraw::DrawViewDimension* dimension,
|
||||
fromQtGui(mapRectFromItem(datumLabel, datumLabel->boundingRect())));
|
||||
areaPoint areaPoint = dimension->getAreaPoint();
|
||||
|
||||
double endAngle;
|
||||
double startRotation;
|
||||
|
||||
drawAreaExecutive(
|
||||
fromQtApp(areaPoint.center), areaPoint.area, labelRectangle, 0.0, viewProvider->StandardAndStyle.getValue(),
|
||||
viewProvider->RenderingExtent.getValue(), viewProvider->FlipArrowheads.getValue());
|
||||
|
||||
@@ -196,6 +196,7 @@ void ViewProviderLeader::handleChangedPropertyType(Base::XMLReader &reader, cons
|
||||
|
||||
bool ViewProviderLeader::onDelete(const std::vector<std::string> & parameters)
|
||||
{
|
||||
Q_UNUSED(parameters)
|
||||
// a leader line cannot be deleted if it has a child weld symbol
|
||||
|
||||
// get childs
|
||||
|
||||
Reference in New Issue
Block a user