remove stars from auto

* is pointless for auto. It's also confusing.

Case in point, the variables used in map are now actually const.
There's a difference between const X* and const * X const.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev 2020-05-07 18:53:48 -07:00
parent ccfb50166a
commit 3cd0f70662
No known key found for this signature in database
GPG Key ID: 36D31CFA845F0E3B
3 changed files with 4 additions and 4 deletions

View File

@ -1024,11 +1024,11 @@ template <typename Context> struct arg_mapper {
return reinterpret_cast<const char*>(val);
}
FMT_CONSTEXPR const char* map(signed char* val) {
const auto* const_val = val;
const auto const_val = val;
return map(const_val);
}
FMT_CONSTEXPR const char* map(unsigned char* val) {
const auto* const_val = val;
const auto const_val = val;
return map(const_val);
}

View File

@ -1375,7 +1375,7 @@ inline OutputIt write_padded(OutputIt out,
static_assert(align == align::left || align == align::right, "");
unsigned spec_width = to_unsigned(specs.width);
size_t padding = spec_width > width ? spec_width - width : 0;
auto* shifts = align == align::left ? data::left_padding_shifts
auto shifts = align == align::left ? data::left_padding_shifts
: data::right_padding_shifts;
size_t left_padding = padding >> shifts[specs.align];
auto it = reserve(out, size + padding * specs.fill.size());

View File

@ -58,7 +58,7 @@ void invoke_fmt_time(const uint8_t* Data, size_t Size) {
#else
auto fmtstring = fmt::string_view(fmt_fuzzer::as_chars(Data), Size);
#endif
auto* b = std::localtime(&item);
auto b = std::localtime(&item);
if (b) {
#if FMT_FUZZ_FORMAT_TO_STRING
std::string message = fmt::format(fmtstring, *b);