Use nullptr instead of NULL in the code and documentation

This is a combination of running clang-tidy with modernize-use-nullptr
check for some ports (GTK, X11, OSX) and manual changes to the ports for
which it couldn't be used easily (MSW, DFB) and also manually updating
the docs.

Also replace NULL with null or nullptr in the comments as this is more
consistent with the use of nullptr in the code and makes it simpler to
grep for the remaining occurrences of NULL itself.

And also use null in the assert messages.

Only a few occurrences of "NULL" are still left in non-C files, mostly
corresponding to unclear comments or string output which it might not be
safe to change.
This commit is contained in:
Vadim Zeitlin 2022-10-16 01:24:34 +02:00
parent 39ea524943
commit 4f4c5fcfdf
1844 changed files with 13721 additions and 13734 deletions

View file

@ -927,7 +927,7 @@ public:
// all conversions functions return true to indicate whether parsing
// succeeded or failed and fill in the provided end iterator, which must
// not be NULL, with the location of the character where the parsing
// not be null, with the location of the character where the parsing
// stopped (this will be end() of the passed string if everything was
// parsed)
@ -1021,7 +1021,7 @@ public:
// backwards compatible versions of the parsing functions: they return an
// object representing the next character following the date specification
// (i.e. the one where the scan had to stop) or a special NULL-like object
// (i.e. the one where the scan had to stop) or a special nullptr-like object
// on failure
//
// they're not deprecated because a lot of existing code uses them and
@ -1120,7 +1120,7 @@ public:
inline wxLongLong GetValue() const;
// a helper function to get the current time_t
static time_t GetTimeNow() { return time(NULL); }
static time_t GetTimeNow() { return time(nullptr); }
// another one to get the current time broken down
static struct tm *GetTmNow()