Changeset - r25707:226494aad20a
[Not reviewed]
master
0 8 0
Rubidium - 3 years ago 2021-06-16 19:12:08
rubidium@openttd.org
Cleanup: use nullptr instead of 0 or NULL
8 files changed with 9 insertions and 9 deletions:
0 comments (0 inline, 0 general)
src/main_gui.cpp
Show inline comments
 
@@ -309,7 +309,7 @@ struct MainWindow : Window
 
			case GHK_REFRESH_SCREEN: MarkWholeScreenDirty(); break;
 

	
 
			case GHK_CRASH: // Crash the game
 
				*(volatile byte *)0 = 0;
 
				*(volatile byte *)nullptr = 0;
 
				break;
 

	
 
			case GHK_MONEY: // Gimme money
src/network/core/tcp_connect.cpp
Show inline comments
 
@@ -268,7 +268,7 @@ bool TCPConnecter::CheckActivity()
 
	timeval tv;
 
	tv.tv_usec = 0;
 
	tv.tv_sec = 0;
 
	int n = select(FD_SETSIZE, NULL, &write_fd, NULL, &tv);
 
	int n = select(FD_SETSIZE, nullptr, &write_fd, nullptr, &tv);
 
	/* select() failed; hopefully next try it doesn't. */
 
	if (n < 0) {
 
		/* select() normally never fails; so hopefully it works next try! */
src/network/network_command.cpp
Show inline comments
 
@@ -179,7 +179,7 @@ void NetworkSyncCommandQueue(NetworkClie
 
{
 
	for (CommandPacket *p = _local_execution_queue.Peek(); p != nullptr; p = p->next) {
 
		CommandPacket c = *p;
 
		c.callback = 0;
 
		c.callback = nullptr;
 
		cs->outgoing_queue.Append(&c);
 
	}
 
}
src/newgrf_commons.h
Show inline comments
 
@@ -309,7 +309,7 @@ bool Convert8bitBooleanCallback(const st
 
 */
 
template <size_t Tcnt>
 
struct GRFFilePropsBase {
 
	GRFFilePropsBase() : local_id(0), grffile(0)
 
	GRFFilePropsBase() : local_id(0), grffile(nullptr)
 
	{
 
		/* The lack of some compilers to provide default constructors complying to the specs
 
		 * requires us to zero the stuff ourself. */
src/os/unix/font_unix.cpp
Show inline comments
 
@@ -51,10 +51,10 @@ FT_Error GetFontByFaceName(const char *f
 
		/* Resolve the name and populate the information structure */
 
		pat = FcNameParse((FcChar8 *)font_family);
 
		if (font_style != nullptr) FcPatternAddString(pat, FC_STYLE, (FcChar8 *)font_style);
 
		FcConfigSubstitute(0, pat, FcMatchPattern);
 
		FcConfigSubstitute(nullptr, pat, FcMatchPattern);
 
		FcDefaultSubstitute(pat);
 
		fs = FcFontSetCreate();
 
		match = FcFontMatch(0, pat, &result);
 
		match = FcFontMatch(nullptr, pat, &result);
 

	
 
		if (fs != nullptr && match != nullptr) {
 
			int i;
src/os/unix/unix.cpp
Show inline comments
 
@@ -277,7 +277,7 @@ bool GetClipboardContents(char *buffer, 
 
	}
 

	
 
	char *clip = SDL_GetClipboardText();
 
	if (clip != NULL) {
 
	if (clip != nullptr) {
 
		strecpy(buffer, clip, last);
 
		SDL_free(clip);
 
		return true;
src/video/opengl.cpp
Show inline comments
 
@@ -1309,7 +1309,7 @@ void OpenGLBackend::RenderOglSprite(Open
 
			_glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
 

	
 
			_glBufferSubData(GL_PIXEL_UNPACK_BUFFER, 0, 256, GetNonSprite(GB(pal, 0, PALETTE_WIDTH), ST_RECOLOUR) + 1);
 
			_glTexSubImage1D(GL_TEXTURE_1D, 0, 0, 256, GL_RED, GL_UNSIGNED_BYTE, 0);
 
			_glTexSubImage1D(GL_TEXTURE_1D, 0, 0, 256, GL_RED, GL_UNSIGNED_BYTE, nullptr);
 

	
 
			_glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0);
 

	
src/video/sdl2_v.cpp
Show inline comments
 
@@ -593,7 +593,7 @@ void VideoDriver_SDL_Base::Stop()
 
void VideoDriver_SDL_Base::InputLoop()
 
{
 
	uint32 mod = SDL_GetModState();
 
	const Uint8 *keys = SDL_GetKeyboardState(NULL);
 
	const Uint8 *keys = SDL_GetKeyboardState(nullptr);
 

	
 
	bool old_ctrl_pressed = _ctrl_pressed;
 

	
0 comments (0 inline, 0 general)