notcurses-view: remove unused variable 'gotinput'

This commit is contained in:
nick black 2020-12-13 02:55:17 -05:00
parent ea131b9b11
commit 97c2d53abf
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC
2 changed files with 4 additions and 7 deletions

View File

@ -31,8 +31,8 @@ get_tty_fd(const char* dev){
static bool
is_linux_console(int fd){
int mode, r;
if( (r = ioctl(fd, KDGETMODE, &mode)) ){
int mode;
if(ioctl(fd, KDGETMODE, &mode)){
fprintf(stderr, "Not a Linux console, KDGETMODE failed (%s)\n", strerror(errno));
return false;
}

View File

@ -123,9 +123,7 @@ auto perframe(struct ncvisual* ncv, struct ncvisual_options* vopts,
ncplane_dim_yx(vopts->n, &oldy, &oldx);
uint64_t absnow = timespec_to_ns(abstime);
char32_t keyp;
bool gotinput;
do{
gotinput = false;
for( ; ; ){
struct timespec interval;
clock_gettime(CLOCK_MONOTONIC, &interval);
uint64_t nsnow = timespec_to_ns(&interval);
@ -138,7 +136,6 @@ auto perframe(struct ncvisual* ncv, struct ncvisual_options* vopts,
if(keyp == (char32_t)-1){
break;
}
gotinput = true;
if(keyp == ' '){
if((keyp = nc.getc(true)) == (char32_t)-1){
return -1;
@ -168,7 +165,7 @@ auto perframe(struct ncvisual* ncv, struct ncvisual_options* vopts,
continue;
}
return 1;
}while(gotinput);
}
return 0;
}