@@ -77,7 +77,7 @@ void Header_setLayout(Header* this, HeaderLayout hLayout) {
7777 Header_calculateHeight (this );
7878}
7979
80- static void Header_addMeterByName (Header * this , const char * name , MeterModeId mode , unsigned int column ) {
80+ static void Header_addMeterByName (Header * this , const char * name , MeterModeId mode , size_t column ) {
8181 assert (column < HeaderLayout_getColumns (this -> headerLayout ));
8282
8383 Vector * meters = this -> columns [column ];
@@ -170,7 +170,7 @@ void Header_writeBackToSettings(const Header* this) {
170170 }
171171}
172172
173- Meter * Header_addMeterByClass (Header * this , const MeterClass * type , unsigned int param , unsigned int column ) {
173+ Meter * Header_addMeterByClass (Header * this , const MeterClass * type , unsigned int param , size_t column ) {
174174 assert (column < HeaderLayout_getColumns (this -> headerLayout ));
175175
176176 Vector * meters = this -> columns [column ];
@@ -198,8 +198,8 @@ void Header_draw(const Header* this) {
198198 for (int y = 0 ; y < height ; y ++ ) {
199199 mvhline (y , 0 , ' ' , COLS );
200200 }
201- const int numCols = HeaderLayout_getColumns (this -> headerLayout );
202- const int width = COLS - 2 * pad - (numCols - 1 );
201+ const size_t numCols = HeaderLayout_getColumns (this -> headerLayout );
202+ const size_t width = COLS - 2 * pad - (numCols - 1 );
203203 int x = pad ;
204204 float roundingLoss = 0.0F ;
205205
@@ -221,7 +221,7 @@ void Header_draw(const Header* this) {
221221 /* Let meters in text mode expand to the right on empty neighbors;
222222 except for multi column meters. */
223223 if (meter -> mode == TEXT_METERMODE && !Meter_isMultiColumn (meter )) {
224- for (int j = 1 ; j < meter -> columnWidthCount ; j ++ ) {
224+ for (size_t j = 1 ; j < meter -> columnWidthCount ; j ++ ) {
225225 actualWidth ++ ; /* separator column */
226226 actualWidth += (float )width * HeaderLayout_layouts [this -> headerLayout ].widths [col + j ] / 100.0F ;
227227 }
@@ -253,7 +253,7 @@ void Header_updateData(Header* this) {
253253 * by counting how many columns to the right are empty or contain a BlankMeter.
254254 * Returns the number of columns to span, i.e. if the direct neighbor is occupied 1.
255255 */
256- static int calcColumnWidthCount (const Header * this , const Meter * curMeter , const int pad , const unsigned int curColumn , const int curHeight ) {
256+ static size_t calcColumnWidthCount (const Header * this , const Meter * curMeter , const int pad , const size_t curColumn , const int curHeight ) {
257257 for (size_t i = curColumn + 1 ; i < HeaderLayout_getColumns (this -> headerLayout ); i ++ ) {
258258 const Vector * meters = this -> columns [i ];
259259
0 commit comments