mirror of https://github.com/xzeldon/htop.git
Header: cache number of columns in HeaderLayout_getColumns
The header layout, and therefore the number of columns, should never be changed within such loop.
This commit is contained in:
parent
3c8d586a1c
commit
68c00b9cdb
2
Header.h
2
Header.h
|
@ -23,7 +23,7 @@ typedef struct Header_ {
|
|||
int height;
|
||||
} Header;
|
||||
|
||||
#define Header_forEachColumn(this_, i_) for (size_t (i_)=0; (i_) < HeaderLayout_getColumns((this_)->headerLayout); ++(i_))
|
||||
#define Header_forEachColumn(this_, i_) for (size_t (i_)=0, H_fEC_numColumns_ = HeaderLayout_getColumns((this_)->headerLayout); (i_) < H_fEC_numColumns_; ++(i_))
|
||||
|
||||
Header* Header_new(ProcessList* pl, Settings* settings, HeaderLayout hLayout);
|
||||
|
||||
|
|
Loading…
Reference in New Issue