clang-tidy: use auto
Found with modernize-use-auto Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
parent
65d257675f
commit
c883f178b8
@ -46,7 +46,7 @@ size_t
|
|||||||
decoder_read_much(DecoderClient *client, InputStream &is,
|
decoder_read_much(DecoderClient *client, InputStream &is,
|
||||||
void *_buffer, size_t size) noexcept
|
void *_buffer, size_t size) noexcept
|
||||||
{
|
{
|
||||||
uint8_t *buffer = (uint8_t *)_buffer;
|
auto buffer = (uint8_t *)_buffer;
|
||||||
|
|
||||||
size_t total = 0;
|
size_t total = 0;
|
||||||
|
|
||||||
@ -67,7 +67,7 @@ bool
|
|||||||
decoder_read_full(DecoderClient *client, InputStream &is,
|
decoder_read_full(DecoderClient *client, InputStream &is,
|
||||||
void *_buffer, size_t size) noexcept
|
void *_buffer, size_t size) noexcept
|
||||||
{
|
{
|
||||||
auto *buffer = (uint8_t *)_buffer;
|
auto buffer = (uint8_t *)_buffer;
|
||||||
|
|
||||||
while (size > 0) {
|
while (size > 0) {
|
||||||
size_t nbytes = decoder_read(client, is, buffer, size);
|
size_t nbytes = decoder_read(client, is, buffer, size);
|
||||||
|
@ -291,7 +291,7 @@ FileDescriptor::GetSize() const noexcept
|
|||||||
void
|
void
|
||||||
FileDescriptor::FullRead(void *_buffer, size_t length)
|
FileDescriptor::FullRead(void *_buffer, size_t length)
|
||||||
{
|
{
|
||||||
auto *buffer = (uint8_t *)_buffer;
|
auto buffer = (uint8_t *)_buffer;
|
||||||
|
|
||||||
while (length > 0) {
|
while (length > 0) {
|
||||||
ssize_t nbytes = Read(buffer, length);
|
ssize_t nbytes = Read(buffer, length);
|
||||||
@ -309,7 +309,7 @@ FileDescriptor::FullRead(void *_buffer, size_t length)
|
|||||||
void
|
void
|
||||||
FileDescriptor::FullWrite(const void *_buffer, size_t length)
|
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) {
|
while (length > 0) {
|
||||||
ssize_t nbytes = Write(buffer, length);
|
ssize_t nbytes = Write(buffer, length);
|
||||||
|
Loading…
Reference in New Issue
Block a user