*: use auto

This commit is contained in:
Max Kellermann
2020-02-01 13:55:08 +01:00
parent 4f22f4d357
commit 72ec641f0d
51 changed files with 87 additions and 87 deletions

View File

@@ -160,7 +160,7 @@ NfsConnection::CancellableCallback::Callback(int err, void *data) noexcept
assert(close_fh == nullptr);
if (err >= 0) {
struct nfsfh *fh = (struct nfsfh *)data;
auto *fh = (struct nfsfh *)data;
connection.Close(fh);
}
} else if (close_fh != nullptr)
@@ -574,7 +574,7 @@ void
NfsConnection::MountCallback(int status, nfs_context *nfs, void *data,
void *private_data) noexcept
{
NfsConnection *c = (NfsConnection *)private_data;
auto *c = (NfsConnection *)private_data;
c->MountCallback(status, nfs, data);
}

View File

@@ -28,7 +28,7 @@
static size_t
FlacIORead(void *ptr, size_t size, size_t nmemb, FLAC__IOHandle handle)
{
InputStream *is = (InputStream *)handle;
auto *is = (InputStream *)handle;
uint8_t *const p0 = (uint8_t *)ptr, *p = p0,
*const end = p0 + size * nmemb;
@@ -70,7 +70,7 @@ FlacIORead(void *ptr, size_t size, size_t nmemb, FLAC__IOHandle handle)
static int
FlacIOSeek(FLAC__IOHandle handle, FLAC__int64 _offset, int whence)
{
InputStream *is = (InputStream *)handle;
auto *is = (InputStream *)handle;
offset_type offset = _offset;
switch (whence) {
@@ -104,7 +104,7 @@ FlacIOSeek(FLAC__IOHandle handle, FLAC__int64 _offset, int whence)
static FLAC__int64
FlacIOTell(FLAC__IOHandle handle)
{
InputStream *is = (InputStream *)handle;
auto *is = (InputStream *)handle;
return is->GetOffset();
}
@@ -112,7 +112,7 @@ FlacIOTell(FLAC__IOHandle handle)
static int
FlacIOEof(FLAC__IOHandle handle)
{
InputStream *is = (InputStream *)handle;
auto *is = (InputStream *)handle;
return is->LockIsEOF();
}