inline ncplane_cell_ref_yx()

pull/1134/head
nick black 4 years ago committed by Nick Black
parent b6e5b60374
commit d662bd334d

@ -577,7 +577,12 @@ pool_extended_gcluster(const egcpool* pool, const cell* c){
return egcpool_extended_gcluster(pool, c); return egcpool_extended_gcluster(pool, c);
} }
cell* ncplane_cell_ref_yx(ncplane* n, int y, int x); static inline cell*
ncplane_cell_ref_yx(ncplane* n, int y, int x){
assert(y < n->leny);
assert(x < n->lenx);
return &n->fb[nfbcellidx(n, y, x)];
}
static inline void static inline void
cell_set_wide(cell* c){ cell_set_wide(cell* c){

@ -229,12 +229,6 @@ char* ncplane_at_yx(const ncplane* n, int y, int x, uint16_t* stylemask, uint64_
return ret; return ret;
} }
cell* ncplane_cell_ref_yx(ncplane* n, int y, int x){
assert(y < n->leny);
assert(x < n->lenx);
return &n->fb[nfbcellidx(n, y, x)];
}
void ncplane_dim_yx(const ncplane* n, int* rows, int* cols){ void ncplane_dim_yx(const ncplane* n, int* rows, int* cols){
if(rows){ if(rows){
*rows = n->leny; *rows = n->leny;
@ -363,7 +357,6 @@ ncplane* ncplane_new_internal(notcurses* nc, ncplane* n,
p->name = strdup(nopts->name ? nopts->name : ""); p->name = strdup(nopts->name ? nopts->name : "");
p->align = NCALIGN_UNALIGNED; p->align = NCALIGN_UNALIGNED;
if(!n){ // new root/standard plane if(!n){ // new root/standard plane
assert(!(nopts->flags & NCPLANE_OPTION_HORALIGNED));
p->absy = nopts->y; p->absy = nopts->y;
p->absx = nopts->x; p->absx = nopts->x;
p->bnext = NULL; p->bnext = NULL;

Loading…
Cancel
Save