modernize C++: use bool literals

This commit is contained in:
wmayer
2023-08-05 23:44:44 +02:00
committed by wwmayer
parent 51a34d1fbd
commit 2a88c7c7df
25 changed files with 46 additions and 46 deletions

View File

@@ -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();

View File

@@ -594,7 +594,7 @@ void Helix::proposeParameters(bool force)
Pitch.setValue(pitch);
Height.setValue(pitch * 3.0);
HasBeenEdited.setValue(1);
HasBeenEdited.setValue(true);
}
}

View File

@@ -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);

View File

@@ -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");
}