Skip to content

Commit 15cf7ab

Browse files
committed
removing unneded newline and adding extra space for if condition
1 parent 5fb773a commit 15cf7ab

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

Meter.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,16 +137,16 @@ static void BarMeterMode_draw(Meter* this, int x, int y, int w) {
137137

138138
// First draw in the bar[] buffer...
139139
int offset = 0;
140-
const wchar_t* barChar = &bars[settings->barType][1];
141-
const size_t barLen = wcslen(barChar);
140+
const wchar_t* barChars = &bars[settings->barType][1];
141+
const size_t barLen = wcslen(barChars);
142142
const uint8_t wsub = w * barLen;
143143

144144
for (uint8_t i = 0; i < this->curItems; i++) {
145145
double value = this->values[i];
146146
int actualWidth = 0;
147147

148148
// ignore extremely small values
149-
if((value / this->total) * wsub < 0.5){
149+
if ((value / this->total) * wsub < 0.5) {
150150
blockSizes[i] = 0;
151151
continue;
152152
}
@@ -161,7 +161,6 @@ static void BarMeterMode_draw(Meter* this, int x, int y, int w) {
161161
// (Control against invalid values)
162162
nextOffset = CLAMP(nextOffset, 0, w);
163163

164-
165164
for (int j = offset; j < nextOffset; j++){
166165
if (RichString_getCharVal(bar, startPos + j) == ' ') {
167166
if (CRT_colorScheme == COLORSCHEME_MONOCHROME) {
@@ -175,7 +174,7 @@ static void BarMeterMode_draw(Meter* this, int x, int y, int w) {
175174
}
176175
}
177176

178-
RichString_setChar(&bar, startPos + nextOffset-1, barChar[actualWidth % barLen]);
177+
RichString_setChar(&bar, startPos + nextOffset-1, barChars[actualWidth % barLen]);
179178

180179
offset = nextOffset;
181180
}

0 commit comments

Comments
 (0)