3 ms·
> For example, clang-format at $day_job doesn't understand semantically that I want my 4x4 matrix constant to be formatted as 4 rows with 4 numbers each Commen
by ridiculous_fish 7y ago
> For example, clang-format at $day_job doesn't understand semantically that I want my 4x4 matrix constant to be formatted as 4 rows with 4 numbers each
Comments can be a low-key forced line break:
int matrix[16] = {
0x0, 0x1, 0x2, 0x3, //
0x4, 0x5, 0x6, 0x7, //
0x8, 0x9, 0xA, 0xB, //
0xC, 0xD, 0xE, 0xF, //
};
- saagarjha 7y agoUsually in cases like these I prefer to add the magic “formatter off” comment around the block: it’s self-documenting.