clang-tidy: use auto

Found with modernize-use-auto

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev 2020-09-25 22:05:43 -07:00
parent 65d257675f
commit c883f178b8
No known key found for this signature in database
GPG Key ID: 36D31CFA845F0E3B
2 changed files with 4 additions and 4 deletions

View File

@ -46,7 +46,7 @@ size_t
decoder_read_much(DecoderClient *client, InputStream &is,
void *_buffer, size_t size) noexcept
{
uint8_t *buffer = (uint8_t *)_buffer;
auto buffer = (uint8_t *)_buffer;
size_t total = 0;
@ -67,7 +67,7 @@ bool
decoder_read_full(DecoderClient *client, InputStream &is,
void *_buffer, size_t size) noexcept
{
auto *buffer = (uint8_t *)_buffer;
auto buffer = (uint8_t *)_buffer;
while (size > 0) {
size_t nbytes = decoder_read(client, is, buffer, size);

View File

@ -291,7 +291,7 @@ FileDescriptor::GetSize() const noexcept
void
FileDescriptor::FullRead(void *_buffer, size_t length)
{
auto *buffer = (uint8_t *)_buffer;
auto buffer = (uint8_t *)_buffer;
while (length > 0) {
ssize_t nbytes = Read(buffer, length);
@ -309,7 +309,7 @@ FileDescriptor::FullRead(void *_buffer, size_t length)
void
FileDescriptor::FullWrite(const void *_buffer, size_t length)
{
const uint8_t *buffer = (const uint8_t *)_buffer;
auto buffer = (const uint8_t *)_buffer;
while (length > 0) {
ssize_t nbytes = Write(buffer, length);