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