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
|
|
@ -210,7 +210,7 @@ public:
|
|||
// find first colour that is not used in the image and has higher
|
||||
// RGB values than RGB(startR, startG, startB)
|
||||
//
|
||||
// returns true and puts this colour in r, g, b (each of which may be NULL)
|
||||
// returns true and puts this colour in r, g, b (each of which may be null)
|
||||
// on success or returns false if there are no more free colours
|
||||
bool FindFirstUnusedColour(unsigned char *r,
|
||||
unsigned char *g,
|
||||
|
|
@ -383,7 +383,7 @@ public:
|
|||
// Rotates the image about the given point, 'angle' radians.
|
||||
// Returns the rotated image, leaving this image intact.
|
||||
wxImage Rotate(double angle, const wxPoint & centre_of_rotation,
|
||||
bool interpolating = true, wxPoint * offset_after_rotation = NULL) const;
|
||||
bool interpolating = true, wxPoint * offset_after_rotation = nullptr) const;
|
||||
|
||||
wxImage Rotate90( bool clockwise = true ) const;
|
||||
wxImage Rotate180() const;
|
||||
|
|
@ -506,9 +506,9 @@ public:
|
|||
void SetData( unsigned char *data, bool static_data=false );
|
||||
void SetData( unsigned char *data, int new_width, int new_height, bool static_data=false );
|
||||
|
||||
unsigned char *GetAlpha() const; // may return NULL!
|
||||
bool HasAlpha() const { return GetAlpha() != NULL; }
|
||||
void SetAlpha(unsigned char *alpha = NULL, bool static_data=false);
|
||||
unsigned char *GetAlpha() const; // may return nullptr!
|
||||
bool HasAlpha() const { return GetAlpha() != nullptr; }
|
||||
void SetAlpha(unsigned char *alpha = nullptr, bool static_data=false);
|
||||
void InitAlpha();
|
||||
void ClearAlpha();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue