Part: modernize C++11
* use nullptr
This commit is contained in:
@@ -261,7 +261,7 @@ PyObject* AttachEnginePy::getModeInfo(PyObject* args)
|
||||
{
|
||||
char* modeName;
|
||||
if (!PyArg_ParseTuple(args, "s", &modeName))
|
||||
return 0;
|
||||
return nullptr;
|
||||
|
||||
try {
|
||||
AttachEngine &attacher = *(this->getAttachEnginePtr());
|
||||
@@ -317,7 +317,7 @@ PyObject* AttachEnginePy::getRefTypeOfShape(PyObject* args)
|
||||
{
|
||||
PyObject *pcObj;
|
||||
if (!PyArg_ParseTuple(args, "O!", &(Part::TopoShapePy::Type), &pcObj))
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
try{
|
||||
TopoDS_Shape shape = static_cast<Part::TopoShapePy*>(pcObj)->getTopoShapePtr()->getShape();
|
||||
@@ -331,7 +331,7 @@ PyObject* AttachEnginePy::isFittingRefType(PyObject* args)
|
||||
char* type_shape_str;
|
||||
char* type_need_str;
|
||||
if (!PyArg_ParseTuple(args, "ss", &type_shape_str, &type_need_str))
|
||||
return 0;
|
||||
return nullptr;
|
||||
try {
|
||||
eRefType type_shape = AttachEngine::getRefTypeByName(std::string(type_shape_str));
|
||||
eRefType type_need = AttachEngine::getRefTypeByName(std::string(type_need_str));
|
||||
@@ -344,7 +344,7 @@ PyObject* AttachEnginePy::downgradeRefType(PyObject* args)
|
||||
{
|
||||
char* type_shape_str;
|
||||
if (!PyArg_ParseTuple(args, "s", &type_shape_str))
|
||||
return 0;
|
||||
return nullptr;
|
||||
try {
|
||||
eRefType type_shape = AttachEngine::getRefTypeByName(std::string(type_shape_str));
|
||||
eRefType result = AttachEngine::downgradeType(type_shape);
|
||||
@@ -356,7 +356,7 @@ PyObject* AttachEnginePy::getRefTypeInfo(PyObject* args)
|
||||
{
|
||||
char* typeName;
|
||||
if (!PyArg_ParseTuple(args, "s", &typeName))
|
||||
return 0;
|
||||
return nullptr;
|
||||
|
||||
try {
|
||||
AttachEngine &attacher = *(this->getAttachEnginePtr());
|
||||
@@ -399,7 +399,7 @@ PyObject* AttachEnginePy::getRefTypeInfo(PyObject* args)
|
||||
PyObject* AttachEnginePy::copy(PyObject* args)
|
||||
{
|
||||
if (!PyArg_ParseTuple(args, ""))
|
||||
return 0;
|
||||
return nullptr;
|
||||
|
||||
return new AttachEnginePy(this->getAttachEnginePtr()->copy());
|
||||
}
|
||||
@@ -408,7 +408,7 @@ PyObject* AttachEnginePy::calculateAttachedPlacement(PyObject* args)
|
||||
{
|
||||
PyObject *pcObj;
|
||||
if (!PyArg_ParseTuple(args, "O!", &(Base::PlacementPy::Type), &pcObj))
|
||||
return NULL;
|
||||
return nullptr;
|
||||
try{
|
||||
const Base::Placement& plm = *(static_cast<const Base::PlacementPy*>(pcObj)->getPlacementPtr());
|
||||
Base::Placement result;
|
||||
@@ -421,13 +421,13 @@ PyObject* AttachEnginePy::calculateAttachedPlacement(PyObject* args)
|
||||
return new Base::PlacementPy(new Base::Placement(result));
|
||||
} ATTACHERPY_STDCATCH_METH;
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
PyObject* AttachEnginePy::suggestModes(PyObject* args)
|
||||
{
|
||||
if (!PyArg_ParseTuple(args, ""))
|
||||
return 0;
|
||||
return nullptr;
|
||||
|
||||
try {
|
||||
AttachEngine &attacher = *(this->getAttachEnginePtr());
|
||||
@@ -556,7 +556,7 @@ PyObject* AttachEnginePy::writeParametersToFeature(PyObject* args)
|
||||
|
||||
PyObject* AttachEnginePy::getCustomAttributes(const char*) const
|
||||
{
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
int AttachEnginePy::setCustomAttributes(const char*,PyObject*)
|
||||
|
||||
Reference in New Issue
Block a user