modernize C++: use nullptr
This commit is contained in:
@@ -122,7 +122,7 @@ public:
|
||||
std::ostringstream& ss,
|
||||
ElementIDRefs* sids,
|
||||
long masterTag,
|
||||
const char* postfix = 0,
|
||||
const char* postfix = nullptr,
|
||||
long tag = 0,
|
||||
bool forceTag = false) const;
|
||||
|
||||
@@ -183,7 +183,7 @@ public:
|
||||
|
||||
long getElementHistory(const MappedName & name,
|
||||
long masterTag,
|
||||
MappedName *original=0, std::vector<MappedName> *history=0) const;
|
||||
MappedName *original=nullptr, std::vector<MappedName> *history=nullptr) const;
|
||||
|
||||
private:
|
||||
/** Serialize this map
|
||||
|
||||
@@ -63,12 +63,12 @@ PyObject* StringHasherPy::getID(PyObject *args)
|
||||
{
|
||||
long id = -1;
|
||||
int index = 0;
|
||||
PyObject *value = 0;
|
||||
PyObject *value = nullptr;
|
||||
PyObject *base64 = Py_False;
|
||||
if (!PyArg_ParseTuple(args, "l|i",&id,&index)) {
|
||||
PyErr_Clear();
|
||||
if (!PyArg_ParseTuple(args, "O|O",&value,&base64))
|
||||
return NULL; // NULL triggers exception
|
||||
return nullptr;
|
||||
}
|
||||
if(id>0) {
|
||||
PY_TRY {
|
||||
@@ -139,7 +139,7 @@ Py::Dict StringHasherPy::getTable() const {
|
||||
|
||||
PyObject *StringHasherPy::getCustomAttributes(const char* /*attr*/) const
|
||||
{
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
int StringHasherPy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/)
|
||||
|
||||
Reference in New Issue
Block a user