Cleanup: add missing include, use nullptr literal

This commit is contained in:
Campbell Barton 2023-09-26 19:50:02 +10:00
parent 56e98f8ba6
commit 943096b3bb
2 changed files with 3 additions and 2 deletions

@ -1243,7 +1243,7 @@ static void console_cursor_set_to_pos(SpaceConsole *sc,
/* Move text cursor to the last selection point. */
ConsoleLine *cl = static_cast<ConsoleLine *>(sc->history.last);
if (cl != NULL) {
if (cl != nullptr) {
if (dragging && sc->sel_end > cl->len && pos <= cl->len) {
/* Do not move cursor while dragging into the editable area. */
}
@ -1288,7 +1288,7 @@ static int console_modal_select_invoke(bContext *C, wmOperator *op, const wmEven
SetConsoleCursor *scu;
ConsoleLine *cl = static_cast<ConsoleLine *>(sc->history.last);
if (cl != NULL) {
if (cl != nullptr) {
const int pos = console_char_pick(sc, CTX_wm_region(C), event->mval);
if (pos >= 0 && pos <= cl->len) {
/* Set text cursor immediately. */

@ -23,6 +23,7 @@
#include "ED_asset.hh"
#include "ED_asset_menu_utils.hh"
#include "ED_node.hh"
#include "ED_screen.hh"
#include "node_intern.hh"