Commit Graph

311 Commits

Author SHA1 Message Date
Victor Zverovich
c242dd402c Move cerrno include to where it is used 2021-05-22 06:18:40 -07:00
Victor Zverovich
21d93bfd33 Move generic format functions to format.h 2021-05-18 19:01:43 -07:00
Victor Zverovich
02896dabee Avoid use after move (#2278) 2021-05-11 16:58:07 -07:00
Victor Zverovich
16f2ef91ab Replace fmt::system_error with std::system_error 2021-05-07 08:33:39 -07:00
Victor Zverovich
c9c0e5077d Cleanup tests 2021-04-30 06:42:38 -07:00
Daniela Engert
d1a6e5603f Keep defaulted destructors inline
applies to exception classes in case of msvc only
2021-04-28 06:17:26 -07:00
Victor Zverovich
84a36b99bf Move data to functions 2021-04-27 17:21:32 -07:00
Victor Zverovich
5b2c740ad8 Remove deprecated APIs 2021-04-23 15:27:25 -07:00
Victor Zverovich
c47f211296 Simplify data handling 2021-04-23 06:52:10 -07:00
Victor Zverovich
54d3b1710e Move more data out of basic_data 2021-04-23 06:45:23 -07:00
Victor Zverovich
841aad95b4 Move data out of basic_data 2021-04-22 15:29:42 -07:00
Victor Zverovich
95da484727 Fix a link 2021-04-03 09:14:52 -07:00
Billy Donahue
308510eb4f "Use" fwrite result (workaround for warn_unused_result)
Fixes #2185
2021-03-31 08:31:35 -07:00
Victor Zverovich
af567538a0 Bitpack integral prefixes 2021-03-11 21:22:33 -08:00
John Steele Scott
772aeca338
Don't include <cassert>. (#2148) (#2152)
* Don't include <cassert>. (#2148)

This commit replaces use of the assert() macro in format-inl.h with
FMT_ASSERT(). This allows us to drop the cassert include.

* FMT_GCC_VERSION is not defined when we include test-assert.h, use __GCC__ instead.

* Don't explicitly suppress GCC's -Wterminate in tests' FMT_ASSERT.

Throwing from a separate function is enough to silence the warning, no need to
explicitly suppress it.

* Remove messages from assertions added in 2f699d2.

* Correct formatting around throw_assertion_failure().
2021-03-04 07:28:04 -08:00
Victor Zverovich
578874033a Revert "Optimize handling of integer constants" (#2147)
This reverts commit 2797588be1.
2021-02-25 05:58:58 -08:00
Victor Zverovich
2797588be1 Optimize handling of integer constants 2021-02-21 11:11:57 -08:00
Victor Zverovich
e8eff3b8fd Fix FMT_STATIC_THOUSANDS_SEPARATOR (#2142) 2021-02-21 07:42:12 -08:00
Victor Zverovich
13b117b5bc Improve code point computation 2021-02-13 08:46:19 -08:00
Victor Zverovich
9ec5592bb5 Fix writing to stdout when redirected to NUL on Windows (#2080) 2020-12-30 13:23:37 -08:00
Alexey Ochapov
bbd6ed5bc5
Add support of most format_specs for formatting at compile-time (#2056) 2020-12-25 06:40:03 -08:00
Victor Zverovich
bcc20b29df Implement compile-time checks by default 2020-11-15 17:24:36 -08:00
Walter Gray
befd7d4a2f
Always use FMT_STRING internally where possible [Issue #2002] (#2006)
Co-authored-by: Walter Gray <walter.gray@getcruise.com>
2020-11-15 05:19:06 -08:00
Victor Zverovich
b5dac0f0f8 Reduce <algorithm> usage (#1998) 2020-11-11 09:12:15 -08:00
Victor Zverovich
6b7bfed40c Fix fallback float formatter at assymetric bounds (#1976) 2020-11-03 19:19:10 -08:00
Victor Zverovich
112755cf91 Remove FMT_SAFEBUFFERS (#1966) 2020-10-29 17:42:45 -07:00
Victor Zverovich
4081b2fe94 Fix ABI compatibility (#1961) 2020-10-29 11:29:47 -07:00
Tobias Hammer
2d9311e860
Remove accidental parenthesis (#1968)
fails only when FMT_BUILTIN_CTZLL is not defined
2020-10-29 07:08:06 -07:00
OptoCloud
bb68f6089b Removed [-Wsign-conversion] warning in GCC 2020-10-28 06:02:17 -07:00
Victor Zverovich
0ecb3d1829 Optimize alignment parsing 2020-10-21 12:45:11 -07:00
Victor Zverovich
297e0bad8c Apply clang-format 2020-10-20 14:10:28 -07:00
Victor Zverovich
3c13a88b14 Optimize floating point formatting 2020-10-09 11:01:01 -07:00
Victor Zverovich
a18b3fbbdc Fix fixed precision handling when rounding (#1917) 2020-10-07 07:42:23 -07:00
Victor Zverovich
af8a180aed Make GetCachedPower test more precise 2020-10-04 08:00:47 -07:00
Kazantcev Andrey
a581e9e5d8
Fix warning C4018: '<=': signed/unsigned mismatch (#1908) 2020-10-02 06:30:57 -07:00
Victor Zverovich
575f401896 Simplify FP formatting and follow coding conventions 2020-09-30 06:36:17 -07:00
jk-jeon
6f3536f974
Move zero-check to an earlier branch (#1906) 2020-09-29 06:24:53 -07:00
Victor Zverovich
90ef46df0b Fix dragonbox integration 2020-09-28 18:10:46 -07:00
Victor Zverovich
3ae88147e2 Fix declaration 2020-09-28 06:50:09 -07:00
Victor Zverovich
6417952574 Improve dragonbox integration 2020-09-27 20:49:37 -07:00
Victor Zverovich
79694d424c Fix WriteConsole signature 2020-09-27 14:26:28 -07:00
Victor Zverovich
63e0c35412 Make dragonbox::to_decimal available in format.h 2020-09-27 07:27:44 -07:00
Victor Zverovich
762c33a964
Simplify windows handling (#1903) 2020-09-26 08:20:38 -07:00
Bernd Baumanns
253d63159f
Remove dependency on windows.h (#1900) 2020-09-26 07:03:16 -07:00
Victor Zverovich
c156093ffd Fix carry in fallback_format 2020-09-25 10:12:44 -07:00
Victor Zverovich
0651e4598b Minor tweaks to get_cached_power 2020-09-23 16:04:40 -07:00
Victor Zverovich
6c025520aa Test that max_k is correctly defined 2020-09-23 15:44:37 -07:00
Victor Zverovich
51f8d0cc21 Reuse log10_2_significand constant 2020-09-23 13:19:21 -07:00
Victor Zverovich
5fd89d50e4 Minor simplifications 2020-09-23 08:05:31 -07:00
Victor Zverovich
605ce5e429 Simplify divisible_by_power_of_2 2020-09-22 20:44:29 -07:00