File tree 1 file changed +15
-2
lines changed
1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -1284,7 +1284,14 @@ namespace loguru
1284
1284
}
1285
1285
}
1286
1286
if (g_preamble_pipe && pos < out_buff_size) {
1287
- /* pos += */ (void )snprintf (out_buff + pos, out_buff_size - pos, " | " );
1287
+ (void )snprintf (out_buff + pos, out_buff_size - pos, " | " );
1288
+
1289
+ // Because this is the last if-statement, we avoid incrementing the
1290
+ // position to clarify it's unused. If more cases are added, then:
1291
+ // int bytes = snprintf(...)
1292
+ // if (bytes > 0) {
1293
+ // pos += bytes;
1294
+ // }
1288
1295
}
1289
1296
}
1290
1297
@@ -1363,7 +1370,13 @@ namespace loguru
1363
1370
}
1364
1371
}
1365
1372
if (g_preamble_pipe && pos < out_buff_size) {
1366
- /* pos += */ (void )snprintf (out_buff + pos, out_buff_size - pos, " | " );
1373
+ (void )snprintf (out_buff + pos, out_buff_size - pos, " | " );
1374
+
1375
+ // Avoid incrementing the position to clarify it's unused
1376
+ // int bytes = snprintf(...)
1377
+ // if (bytes > 0) {
1378
+ // pos += bytes;
1379
+ // }
1367
1380
}
1368
1381
}
1369
1382
You can’t perform that action at this time.
0 commit comments