Skip to content

Commit 3c5c39c

Browse files
committed
Fix
1 parent 2519665 commit 3c5c39c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

cpp-terminal/platforms/input.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ Term::Event Term::Platform::read_raw()
131131
sigemptyset(&sa.sa_mask);
132132
sa.sa_flags = 0;
133133
sa.sa_handler = sigwinchHandler;
134-
if(sigaction(SIGWINCH, &sa, NULL) == -1) throw Term::Exception("signal() failed");
134+
if(sigaction(SIGWINCH, &sa, nullptr) == -1) throw Term::Exception("signal() failed");
135135
else
136136
activated = true;
137137
}

cpp-terminal/platforms/terminal.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@ void Term::Terminal::store_and_restore()
6262
static termios orig_termios;
6363
if(!enabled)
6464
{
65-
if(Private::std_cout.getHandler() >= 0)
65+
if(!Private::std_cout.isNull())
6666
if(tcgetattr(Private::std_cout.getHandler(), &orig_termios) == -1) { throw Term::Exception("tcgetattr() failed"); }
6767
enabled = true;
6868
}
6969
else
7070
{
71-
if(Private::std_cout.getHandler() >= 0)
71+
if(!Private::std_cout.isNull())
7272
if(tcsetattr(Private::std_cout.getHandler(), TCSAFLUSH, &orig_termios) == -1) { throw Term::Exception("tcsetattr() failed in destructor"); }
7373
enabled = false;
7474
}

0 commit comments

Comments
 (0)