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:
parent
39ea524943
commit
4f4c5fcfdf
1844 changed files with 13721 additions and 13734 deletions
|
|
@ -44,7 +44,7 @@ union wxAnyValueBuffer
|
|||
|
||||
wxAnyValueBuffer()
|
||||
{
|
||||
m_ptr = NULL;
|
||||
m_ptr = nullptr;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -324,7 +324,7 @@ public:
|
|||
#if wxUSE_EXTENDED_RTTI
|
||||
virtual const wxTypeInfo* GetTypeInfo() const
|
||||
{
|
||||
return wxGetTypeInfo((T*)NULL);
|
||||
return wxGetTypeInfo((T*)nullptr);
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
|
@ -389,7 +389,7 @@ public: \
|
|||
_WX_ANY_DEFINE_SUB_TYPE(T, CLSTYPE)\
|
||||
virtual const wxTypeInfo* GetTypeInfo() const \
|
||||
{ \
|
||||
return wxGetTypeInfo((T*)NULL); \
|
||||
return wxGetTypeInfo((T*)nullptr); \
|
||||
} \
|
||||
};
|
||||
#else
|
||||
|
|
@ -673,7 +673,7 @@ public:
|
|||
|
||||
/*
|
||||
Let's define a discrete Null value so we don't have to really
|
||||
ever check if wxAny.m_type pointer is NULL or not. This is an
|
||||
ever check if wxAny.m_type pointer is null or not. This is an
|
||||
optimization, mostly. Implementation of this value type is
|
||||
"hidden" in the source file.
|
||||
*/
|
||||
|
|
@ -965,7 +965,7 @@ public:
|
|||
const char* and const wchar_t*) has been assigned to wxAny.
|
||||
*/
|
||||
template <typename T>
|
||||
T As(T* = NULL) const
|
||||
T As(T* = nullptr) const
|
||||
{
|
||||
return wxPrivate::wxAnyAsImpl<T>::DoAs(*this);
|
||||
}
|
||||
|
|
@ -1124,7 +1124,7 @@ struct wxAnyAsImpl<wxString>
|
|||
// This macro shouldn't be used any longer for the same reasons as
|
||||
// wxANY_VALUE_TYPE_CHECK_TYPE(), just call As() directly.
|
||||
#define wxANY_AS(any, T) \
|
||||
(any).As(static_cast<T*>(NULL))
|
||||
(any).As(static_cast<T*>(nullptr))
|
||||
|
||||
|
||||
template<typename T>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue