Skip to content

Commit 6fc84d8

Browse files
committed
add const qualifier
1 parent 1421db8 commit 6fc84d8

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/fwrite.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -264,9 +264,8 @@ void writeFloat64(const void *col, int64_t row, char **pch)
264264
if (sf > dr) width = sf + 1; // 1.234 and 123.4
265265
else { dl0 = 1; width = dr + 1 + dl0; } // 0.1234, 0.0001234
266266
}
267-
bool isWholeNumber = (dr == 0 && dl0 >= 0);
268-
if (forceDecimal && isWholeNumber) {
269-
dr = 0;
267+
const bool isWholeNumber = (dr == 0 && dl0 >= 0);
268+
if (forceDecimal && isWholeNumber) {
270269
width += 1;
271270
}
272271
// So: 3.1416 => l=31416, sf=5, exp=0 dr=4; dl0=0; width=6

0 commit comments

Comments
 (0)