modernize C++: use bool literals
This commit is contained in:
@@ -177,7 +177,7 @@ void FeatureExtrude::generatePrism(TopoDS_Shape& prism,
|
||||
// see e.g. https://forum.freecad.org/viewtopic.php?p=560785#p560785
|
||||
// It is better not to use BRepFeat_MakePrism here even if we have a support because the
|
||||
// resulting shape creates problems with Pocket
|
||||
BRepPrimAPI_MakePrism PrismMaker(from, Ltotal * gp_Vec(direction), 0, 1); // finite prism
|
||||
BRepPrimAPI_MakePrism PrismMaker(from, Ltotal * gp_Vec(direction), Standard_False, Standard_True); // finite prism
|
||||
if (!PrismMaker.IsDone())
|
||||
throw Base::RuntimeError("ProfileBased: Length: Could not extrude the sketch!");
|
||||
prism = PrismMaker.Shape();
|
||||
|
||||
@@ -594,7 +594,7 @@ void Helix::proposeParameters(bool force)
|
||||
|
||||
Pitch.setValue(pitch);
|
||||
Height.setValue(pitch * 3.0);
|
||||
HasBeenEdited.setValue(1);
|
||||
HasBeenEdited.setValue(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1260,9 +1260,9 @@ void Hole::onChanged(const App::Property* prop)
|
||||
CustomThreadClearance.setReadOnly(true);
|
||||
ThreadDepth.setReadOnly(true);
|
||||
ThreadDepthType.setReadOnly(true);
|
||||
Threaded.setValue(0);
|
||||
ModelThread.setValue(0);
|
||||
UseCustomThreadClearance.setValue(0);
|
||||
Threaded.setValue(false);
|
||||
ModelThread.setValue(false);
|
||||
UseCustomThreadClearance.setValue(false);
|
||||
}
|
||||
else if (type == "ISOMetricProfile") {
|
||||
ThreadSize.setEnums(ThreadSize_ISOmetric_Enums);
|
||||
|
||||
@@ -279,7 +279,7 @@ void fixSketchSupport (Sketcher::SketchObject* sketch)
|
||||
return; // Sketch is on a face of a solid, do nothing
|
||||
|
||||
const App::Document* doc = sketch->getDocument();
|
||||
PartDesign::Body *body = getBodyFor(sketch, /*messageIfNot*/ 0);
|
||||
PartDesign::Body *body = getBodyFor(sketch, /*messageIfNot*/ false);
|
||||
if (!body) {
|
||||
throw Base::RuntimeError ("Couldn't find body for the sketch");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user