Commit Graph

13 Commits

Author SHA1 Message Date
Jonathan Gopel
b3a4f28ad1
Fix implicit signedness conversion warning (#1963)
Problem:
- On Apple clang 11.0.3 (clang-1103.0.32.62), pedantic mode compilation
  generates the following error:

    test/std-format-test.cc:114:22: error: implicit conversion changes
          signedness: 'int' to 'size_t' (aka 'unsigned long')
          [-Werror,-Wsign-conversion]
        width_arg_id = c - '0';
                     ~ ~~^~~~~

Solution:
- Use a `to_unsigned` to make the conversion explicit. This is
  guaranteed to be safe due to the check before the ASCII-to-int
  conversion.
2020-10-29 06:26:18 -07:00
Victor Zverovich
56e63078ff Make the n specifier an opt-in 2020-07-03 08:02:48 -07:00
Victor Zverovich
8069265373 internal -> detail (#1538) 2020-05-10 07:34:30 -07:00
Victor Zverovich
7f723fbcb8 Consistently namespace qualify size_t 2020-05-07 15:59:46 -07:00
Victor Zverovich
8cf4c52068 Apply clang-format 2019-12-21 13:10:45 -08:00
daniel
f1559e1d56 Use grouping() from locale for specifier 'n' 2019-11-05 07:22:12 +00:00
Victor Zverovich
f7a4b4ab91 Make numeric alignment optional 2019-09-06 09:43:53 -07:00
Victor Zverovich
4e99e09bb3 Fix warnings 2019-08-10 16:56:57 -07:00
Victor Zverovich
1607a01870 Suppress a warning 2019-08-10 14:15:55 -07:00
Victor Zverovich
f9ceefb0fe Fix a warning and is_negative usage 2019-07-19 14:18:10 +02:00
Victor Zverovich
6bcc3fd216 Fix warnings 2019-07-19 13:27:41 +02:00
Victor Zverovich
d07cc2026b FMT_EXPLICIT -> explicit, FMT_NULL -> nullptr 2019-05-30 07:42:36 -07:00
Victor Zverovich
41fbaeb3b1 Add <format> test 2019-04-13 11:37:52 -07:00