Gui: modernize C++11

* use nullptr
This commit is contained in:
wmayer
2022-03-23 18:41:21 +01:00
parent be7e18757c
commit 1178df06b4
239 changed files with 1197 additions and 1197 deletions

View File

@@ -71,7 +71,7 @@ Py::Object PythonStdout::write(const Py::Tuple& args)
if (!PyArg_ParseTuple(args.ptr(), "O!",&PyUnicode_Type, &output))
throw Py::TypeError("PythonStdout.write() takes exactly one argument of type str");
PyObject* unicode = PyUnicode_AsEncodedString(output, "utf-8", 0);
PyObject* unicode = PyUnicode_AsEncodedString(output, "utf-8", nullptr);
if (unicode) {
const char* string = PyBytes_AsString(unicode);
int maxlen = qstrlen(string) > 10000 ? 10000 : -1;
@@ -137,7 +137,7 @@ Py::Object PythonStderr::write(const Py::Tuple& args)
if (!PyArg_ParseTuple(args.ptr(), "O!",&PyUnicode_Type, &output))
throw Py::TypeError("PythonStderr.write() takes exactly one argument of type str");
PyObject* unicode = PyUnicode_AsEncodedString(output, "utf-8", 0);
PyObject* unicode = PyUnicode_AsEncodedString(output, "utf-8", nullptr);
if (unicode) {
const char* string = PyBytes_AsString(unicode);
int maxlen = qstrlen(string) > 10000 ? 10000 : -1;
@@ -202,7 +202,7 @@ Py::Object OutputStdout::write(const Py::Tuple& args)
if (!PyArg_ParseTuple(args.ptr(), "O!",&PyUnicode_Type, &output))
throw Py::TypeError("OutputStdout.write() takes exactly one argument of type str");
PyObject* unicode = PyUnicode_AsEncodedString(output, "utf-8", 0);
PyObject* unicode = PyUnicode_AsEncodedString(output, "utf-8", nullptr);
if (unicode) {
const char* string = PyBytes_AsString(unicode);
Base::Console().Message("%s",string);
@@ -267,7 +267,7 @@ Py::Object OutputStderr::write(const Py::Tuple& args)
if (!PyArg_ParseTuple(args.ptr(), "O!",&PyUnicode_Type, &output))
throw Py::TypeError("OutputStderr.write() takes exactly one argument of type str");
PyObject* unicode = PyUnicode_AsEncodedString(output, "utf-8", 0);
PyObject* unicode = PyUnicode_AsEncodedString(output, "utf-8", nullptr);
if (unicode) {
const char* string = PyBytes_AsString(unicode);
Base::Console().Error("%s",string);