GLK: Changes of NULL to nullptr

This commit is contained in:
Paul Gilbert
2018-12-08 19:05:59 -08:00
committed by Paul Gilbert
parent a9f5b3351e
commit 4fcffce505
10 changed files with 20 additions and 20 deletions
+3 -3
View File
@@ -237,9 +237,9 @@ void Conf::parseColor(const Common::String &str, byte *color) {
g[0] = str[2]; g[1] = str[3]; g[2] = 0;
b[0] = str[4]; b[1] = str[5]; b[2] = 0;
color[0] = strtol(r, NULL, 16);
color[1] = strtol(g, NULL, 16);
color[2] = strtol(b, NULL, 16);
color[0] = strtol(r, nullptr, 16);
color[1] = strtol(g, nullptr, 16);
color[2] = strtol(b, nullptr, 16);
}
}
+3 -3
View File
@@ -46,7 +46,7 @@ void Events::getEvent(event_t *event, bool polled) {
}
if (_currentEvent->type == evtype_None && _timeouts) {
store(evtype_Timer, NULL, 0, 0);
store(evtype_Timer, nullptr, 0, 0);
dispatchEvent(*_currentEvent, polled);
_timeouts = false;
}
@@ -179,7 +179,7 @@ void Events::handleMouseMove(const Point &pos) {
if (g_vm->_windowMask->getHyperlink(pos)) {
//gdk_window_set_cursor((GTK_WIDGET(widget)->window), gdk_hand);
} else {
//gdk_window_set_cursor((GTK_WIDGET(widget)->window), NULL);
//gdk_window_set_cursor((GTK_WIDGET(widget)->window), nullptr);
}
}
}
@@ -194,7 +194,7 @@ void Events::handleButtonDown(bool isLeft, const Point &pos) {
void Events::handleButtonUp(bool isLeft, const Point &pos) {
if (isLeft) {
g_vm->_copySelect = false;
//gdk_window_set_cursor((GTK_WIDGET(widget)->window), NULL);
//gdk_window_set_cursor((GTK_WIDGET(widget)->window), nullptr);
g_vm->_clipboard->send(PRIMARY);
}
}
+1 -3
View File
@@ -181,8 +181,6 @@ winid_t Glk::glk_window_open(winid_t split, glui32 method, glui32 size, glui32 w
}
void Glk::glk_window_close(winid_t win, stream_result_t *result) {
_windows->_forceRedraw = true;
if (!win) {
warning("glk_window_close: invalid ref");
} else {
@@ -280,7 +278,7 @@ void Glk::glk_window_clear(winid_t win) {
warning("window_clear: invalid ref");
} else if (win->_lineRequest || win->_lineRequestUni) {
if (g_conf->_safeClicks && _events->_forceClick) {
glk_cancel_line_event(win, NULL);
glk_cancel_line_event(win, nullptr);
_events->_forceClick = false;
win->clear();
+1 -1
View File
@@ -63,7 +63,7 @@ glui32 bufferChangeCase(glui32 *buf, glui32 len, glui32 numchars, BufferChangeCa
if (dest_block_first == CASE_TITLE)
dest_block_first = CASE_UPPER;
newoutbuf = NULL;
newoutbuf = nullptr;
outcount = 0;
outbuf = buf;
+1 -1
View File
@@ -11522,7 +11522,7 @@ switch ((glui32)(ch) >> 8) { \
*blockptr = unigen_decomp_block_0x2fa; \
break; \
default: \
*blockptr = NULL; \
*blockptr = nullptr; \
}
#define GET_DECOMP_SPECIAL(ch, countptr, posptr) \
+2 -2
View File
@@ -69,7 +69,7 @@ case 0x104: \
*blockptr = unigen_case_block_0x104; \
break; \
default: \
*blockptr = NULL; \
*blockptr = nullptr; \
}
#define GET_CASE_SPECIAL(ch, specptr) \
@@ -420,7 +420,7 @@ case 0xfb17: \
*specptr = unigen_special_0xfb17; \
break; \
default: \
*specptr = NULL; \
*specptr = nullptr; \
}
typedef glui32 gli_case_block_t[2]; ///< upper, lower
+1 -1
View File
@@ -53,7 +53,7 @@ void GraphicsWindow::rearrange(const Rect &box) {
_w = 0;
_h = 0;
delete _surface;
_surface = NULL;
_surface = nullptr;
return;
}
+1 -1
View File
@@ -38,7 +38,7 @@ public:
glui32 _dir; ///< winmethod_Left, Right, Above, or Below
bool _vertical, _backward; ///< flags
glui32 _division; ///< winmethod_Fixed or winmethod_Proportional
Window *_key; ///< NULL or a leaf-descendant (not a Pair)
Window *_key; ///< nullptr or a leaf-descendant (not a Pair)
int _keyDamage; ///< used as scratch space in window closing
glui32 _size; ///< size value
glui32 _wBorder; ///< winMethod_Border, NoBorder
+2 -2
View File
@@ -446,13 +446,13 @@ void TextGridWindow::acceptLine(glui32 keycode) {
val2 = 0;
g_vm->_events->store(evtype_LineInput, this, _inLen, val2);
free(_lineTerminators);
_lineTerminators = NULL;
_lineTerminators = nullptr;
} else {
g_vm->_events->store(evtype_LineInput, this, _inLen, 0);
}
_lineRequest = false;
_lineRequestUni = false;
_inBuf = NULL;
_inBuf = nullptr;
_inMax = 0;
_inOrgX = 0;
_inOrgY = 0;
+5 -3
View File
@@ -80,15 +80,15 @@ Window *Windows::windowOpen(Window *splitwin, glui32 method, glui32 size,
if (!_rootWin) {
if (splitwin) {
warning("window_open: ref must be NULL");
warning("window_open: ref must be nullptr");
return nullptr;
}
/* ignore method and size now */
oldparent = NULL;
oldparent = nullptr;
} else {
if (!splitwin) {
warning("window_open: ref must not be NULL");
warning("window_open: ref must not be nullptr");
return nullptr;
}
@@ -152,6 +152,8 @@ Window *Windows::windowOpen(Window *splitwin, glui32 method, glui32 size,
}
void Windows::windowClose(Window *win, StreamResult *result) {
_forceRedraw = true;
if (win == _rootWin || win->_parent == nullptr) {
// Close the root window, which means all windows.
_rootWin = nullptr;