Part: modernize C++11
* use nullptr
This commit is contained in:
@@ -40,10 +40,10 @@ PROPERTY_SOURCE_WITH_EXTENSIONS(Part::BodyBase, Part::Feature)
|
||||
|
||||
BodyBase::BodyBase()
|
||||
{
|
||||
ADD_PROPERTY(Tip , (0) );
|
||||
ADD_PROPERTY(Tip , (nullptr) );
|
||||
Tip.setScope(App::LinkScope::Child);
|
||||
|
||||
ADD_PROPERTY(BaseFeature , (0) );
|
||||
ADD_PROPERTY(BaseFeature , (nullptr) );
|
||||
|
||||
App::OriginGroupExtension::initExtension(this);
|
||||
}
|
||||
@@ -51,7 +51,7 @@ BodyBase::BodyBase()
|
||||
BodyBase* BodyBase::findBodyOf(const App::DocumentObject* f)
|
||||
{
|
||||
App::Document* doc = f->getDocument();
|
||||
if (doc != NULL) {
|
||||
if (doc != nullptr) {
|
||||
std::vector<App::DocumentObject*> bodies = doc->getObjectsOfType(BodyBase::getClassTypeId());
|
||||
for (std::vector<App::DocumentObject*>::const_iterator b = bodies.begin(); b != bodies.end(); b++) {
|
||||
BodyBase* body = static_cast<BodyBase*>(*b);
|
||||
@@ -60,7 +60,7 @@ BodyBase* BodyBase::findBodyOf(const App::DocumentObject* f)
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool BodyBase::isAfter(const App::DocumentObject *feature, const App::DocumentObject* target) const {
|
||||
|
||||
Reference in New Issue
Block a user