diff options
author | Rosen Penev <rosenp@gmail.com> | 2020-09-25 22:05:43 -0700 |
---|---|---|
committer | Rosen Penev <rosenp@gmail.com> | 2020-09-26 21:33:35 -0700 |
commit | c883f178b8d57f9acd5208247c6521683346aca3 (patch) | |
tree | 7cd38a71aa7175e94be079ca7b636058d5303fb2 /src/io/FileDescriptor.cxx | |
parent | 65d257675ff42de016a394910d0d39ec59cfc527 (diff) |
clang-tidy: use auto
Found with modernize-use-auto
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Diffstat (limited to 'src/io/FileDescriptor.cxx')
-rw-r--r-- | src/io/FileDescriptor.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/io/FileDescriptor.cxx b/src/io/FileDescriptor.cxx index 49fe8cab8..08b457831 100644 --- a/src/io/FileDescriptor.cxx +++ b/src/io/FileDescriptor.cxx @@ -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); |