A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/fmtlib/fmt/issues/4298 below:

Use uint32_t instead of size_t to store data in basic_specs? · Issue #4298 · fmtlib/fmt · GitHub

In recent refactoring, I can see core format spec are now stored in single data_ element, but the type is size_t, which varies in 32bit/64bit mode.

size_t data_ = 1 << fill_size_shift;

Since it's not storing pointer information and according to the masks, at most 32bit will be used, is it better to change the type to uint32_t?

// Data is arranged as follows: // // 0 1 2 3 // 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ // |type |align| w | p | s |u|#|L| f | unused | // +-----+-----+---+---+---+-+-+-+-----+---------------------------+ // // w - dynamic width info // p - dynamic precision info // s - sign // u - uppercase (e.g. 'X' for 'x') // # - alternate form ('#') // L - localized // f - fill size // // Bitfields are not used because of compiler bugs such as gcc bug 61414. enum : unsigned { type_mask = 0x00007, align_mask = 0x00038, width_mask = 0x000C0, precision_mask = 0x00300, sign_mask = 0x00C00, uppercase_mask = 0x01000, alternate_mask = 0x02000, localized_mask = 0x04000, fill_size_mask = 0x38000, align_shift = 3, width_shift = 6, precision_shift = 8, sign_shift = 10, fill_size_shift = 15, max_fill_size = 4 };

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4