File tree 2 files changed +7
-9
lines changed
2 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -433,13 +433,12 @@ template <typename Char> class basic_string_view {
433
433
*/
434
434
FMT_CONSTEXPR_CHAR_TRAITS
435
435
FMT_INLINE
436
- basic_string_view (const Char* s) : data_(s) {
437
- if (detail::const_check (std::is_same<Char, char >::value &&
438
- !detail::is_constant_evaluated (true )))
439
- size_ = std::strlen (reinterpret_cast <const char *>(s));
440
- else
441
- size_ = std::char_traits<Char>::length (s);
442
- }
436
+ basic_string_view (const Char* s)
437
+ : data_(s),
438
+ size_ (detail::const_check(std::is_same<Char, char >::value &&
439
+ !detail::is_constant_evaluated(true ))
440
+ ? std::strlen(reinterpret_cast <const char *>(s))
441
+ : std::char_traits<Char>::length(s)) {}
443
442
444
443
/* * Constructs a string reference from a ``std::basic_string`` object. */
445
444
template <typename Traits, typename Alloc>
Original file line number Diff line number Diff line change @@ -2118,8 +2118,7 @@ FMT_CONSTEXPR_CHAR_TRAITS auto write(OutputIt out, const Char* value)
2118
2118
if (!value) {
2119
2119
throw_format_error (" string pointer is null" );
2120
2120
} else {
2121
- auto length = std::char_traits<Char>::length (value);
2122
- out = write (out, basic_string_view<Char>(value, length));
2121
+ out = write (out, basic_string_view<Char>(value));
2123
2122
}
2124
2123
return out;
2125
2124
}
You can’t perform that action at this time.
0 commit comments