Skip to content
Snippets Groups Projects
Commit 88f6c39c authored by Sebastian Eibl's avatar Sebastian Eibl
Browse files

[CLANG-TIDY] modernize-use-nullptr

parent 40345a79
Branches
Tags
No related merge requests found
......@@ -126,7 +126,7 @@ object python_createUniformBlockGrid(tuple args, dict kw)
shared_ptr<Config> cfg = python_coupling::configFromPythonDict( kw );
try {
shared_ptr< StructuredBlockForest > blocks = createUniformBlockGridFromConfig( cfg->getGlobalBlock(), NULL, keepGlobalBlockInformation );
shared_ptr< StructuredBlockForest > blocks = createUniformBlockGridFromConfig( cfg->getGlobalBlock(), nullptr, keepGlobalBlockInformation );
return object(blocks);
}
catch( std::exception & e)
......
......@@ -114,7 +114,7 @@ void Manager::triggerInitialization()
}
catch ( boost::python::error_already_set & ) {
PyObject *type_ptr = NULL, *value_ptr = NULL, *traceback_ptr = NULL;
PyObject *type_ptr = nullptr, *value_ptr = nullptr, *traceback_ptr = nullptr;
PyErr_Fetch(&type_ptr, &value_ptr, &traceback_ptr);
if( type_ptr )
......
......@@ -116,7 +116,7 @@ namespace python_coupling {
else
line = PyOS_Readline( stdin, stdout, (char*)prompt2_.c_str() );
if ( line == NULL || *line == '\0' ) { // interrupt or EOF
if ( line == nullptr || *line == '\0' ) { // interrupt or EOF
result.clear();
return false;
}
......
......@@ -67,7 +67,7 @@ struct NumpyIntConversion
auto typeName = std::string( Py_TYPE(pyObj)->tp_name );
if ( typeName.substr(0,9) == "numpy.int" )
return pyObj;
return 0;
return nullptr;
}
static void construct( PyObject* pyObj, converter::rvalue_from_python_stage1_data* data )
......@@ -94,7 +94,7 @@ struct NumpyFloatConversion
auto typeName = std::string( Py_TYPE(pyObj)->tp_name );
if ( typeName.substr(0,11) == "numpy.float" )
return pyObj;
return 0;
return nullptr;
}
static void construct(PyObject* pyObj, converter::rvalue_from_python_stage1_data* data)
......@@ -208,7 +208,7 @@ struct PythonTuple_to_Vector3
using namespace boost::python;
if ( ! ( PySequence_Check(obj) && PySequence_Size( obj ) == 3 ))
return NULL;
return nullptr;
object element0 ( handle<>( borrowed( PySequence_GetItem(obj,0) )));
object element1 ( handle<>( borrowed( PySequence_GetItem(obj,1) )));
......@@ -219,7 +219,7 @@ struct PythonTuple_to_Vector3
extract<T>( element2 ).check() )
return obj;
else
return NULL;
return nullptr;
}
static void construct( PyObject* obj, boost::python::converter::rvalue_from_python_stage1_data* data )
......@@ -302,7 +302,7 @@ struct PythonTuple_to_Cell
using namespace boost::python;
if ( ! ( PySequence_Check(obj) && PySequence_Size( obj ) == 3 ))
return NULL;
return nullptr;
object element0 ( handle<>( borrowed( PySequence_GetItem(obj,0) )));
object element1 ( handle<>( borrowed( PySequence_GetItem(obj,1) )));
......@@ -313,7 +313,7 @@ struct PythonTuple_to_Cell
extract<cell_idx_t>( element2 ).check() )
return obj;
else
return NULL;
return nullptr;
}
static void construct( PyObject* obj, boost::python::converter::rvalue_from_python_stage1_data* data )
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment