Inspection: modernize C++11
* use nullptr
This commit is contained in:
@@ -715,8 +715,8 @@ Feature::Feature()
|
||||
{
|
||||
ADD_PROPERTY(SearchRadius,(0.05));
|
||||
ADD_PROPERTY(Thickness,(0.0));
|
||||
ADD_PROPERTY(Actual,(0));
|
||||
ADD_PROPERTY(Nominals,(0));
|
||||
ADD_PROPERTY(Actual,(nullptr));
|
||||
ADD_PROPERTY(Nominals,(nullptr));
|
||||
ADD_PROPERTY(Distances,(0.0));
|
||||
}
|
||||
|
||||
@@ -745,7 +745,7 @@ App::DocumentObjectExecReturn* Feature::execute(void)
|
||||
if (!pcActual)
|
||||
throw Base::ValueError("No actual geometry to inspect specified");
|
||||
|
||||
InspectActualGeometry* actual = 0;
|
||||
InspectActualGeometry* actual = nullptr;
|
||||
if (pcActual->getTypeId().isDerivedFrom(Mesh::Feature::getClassTypeId())) {
|
||||
Mesh::Feature* mesh = static_cast<Mesh::Feature*>(pcActual);
|
||||
actual = new InspectActualMesh(mesh->Mesh.getValue());
|
||||
@@ -767,7 +767,7 @@ App::DocumentObjectExecReturn* Feature::execute(void)
|
||||
std::vector<InspectNominalGeometry*> inspectNominal;
|
||||
const std::vector<App::DocumentObject*>& nominals = Nominals.getValues();
|
||||
for (std::vector<App::DocumentObject*>::const_iterator it = nominals.begin(); it != nominals.end(); ++it) {
|
||||
InspectNominalGeometry* nominal = 0;
|
||||
InspectNominalGeometry* nominal = nullptr;
|
||||
if ((*it)->getTypeId().isDerivedFrom(Mesh::Feature::getClassTypeId())) {
|
||||
Mesh::Feature* mesh = static_cast<Mesh::Feature*>(*it);
|
||||
nominal = new InspectNominalMesh(mesh->Mesh.getValue(), this->SearchRadius.getValue());
|
||||
@@ -910,7 +910,7 @@ App::DocumentObjectExecReturn* Feature::execute(void)
|
||||
for (std::vector<InspectNominalGeometry*>::iterator it = inspectNominal.begin(); it != inspectNominal.end(); ++it)
|
||||
delete *it;
|
||||
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user