clang-tidy: use auto

Found with modernize-use-auto Signed-off-by: 's avatarRosen Penev <rosenp@gmail.com>
parent 65d25767
......@@ -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);
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment