*: use auto
This commit is contained in:
@@ -584,7 +584,7 @@ ProxyDatabase::OnSocketReady(gcc_unused unsigned flags) noexcept
|
||||
return true;
|
||||
}
|
||||
|
||||
unsigned idle = (unsigned)mpd_recv_idle(connection, false);
|
||||
auto idle = (unsigned)mpd_recv_idle(connection, false);
|
||||
if (idle == 0) {
|
||||
try {
|
||||
CheckError(connection);
|
||||
@@ -666,7 +666,7 @@ ProxyDatabase::ReturnSong(const LightSong *_song) const noexcept
|
||||
{
|
||||
assert(_song != nullptr);
|
||||
|
||||
AllocatedProxySong *song = (AllocatedProxySong *)
|
||||
auto *song = (AllocatedProxySong *)
|
||||
const_cast<LightSong *>(_song);
|
||||
delete song;
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ Directory::CreateChild(const char *name_utf8) noexcept
|
||||
? std::string(name_utf8)
|
||||
: PathTraitsUTF8::Build(GetPath(), name_utf8);
|
||||
|
||||
Directory *child = new Directory(std::move(path_utf8), this);
|
||||
auto *child = new Directory(std::move(path_utf8), this);
|
||||
children.push_back(*child);
|
||||
return child;
|
||||
}
|
||||
|
||||
@@ -177,7 +177,7 @@ UpnpDatabase::ReturnSong(const LightSong *_song) const noexcept
|
||||
{
|
||||
assert(_song != nullptr);
|
||||
|
||||
UpnpSong *song = (UpnpSong *)const_cast<LightSong *>(_song);
|
||||
auto *song = (UpnpSong *)const_cast<LightSong *>(_song);
|
||||
delete song;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user