diff options
author | Rosen Penev <rosenp@gmail.com> | 2020-04-21 15:51:48 -0700 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2020-04-22 18:21:07 +0200 |
commit | 6979be008cb334ca08fc031ecb86a723bf656381 (patch) | |
tree | b7d2f539de8244821280becde85a0d7c7a838db5 /src/mixer | |
parent | 71792ffd4312d3ce1eac2c5e4341cffc788f316a (diff) |
[clang-tidy] use auto
Found with modernize-use-auto.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Diffstat (limited to 'src/mixer')
-rw-r--r-- | src/mixer/plugins/PulseMixerPlugin.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mixer/plugins/PulseMixerPlugin.cxx b/src/mixer/plugins/PulseMixerPlugin.cxx index d4d2d3767..9aa53f107 100644 --- a/src/mixer/plugins/PulseMixerPlugin.cxx +++ b/src/mixer/plugins/PulseMixerPlugin.cxx @@ -214,7 +214,7 @@ PulseMixer::GetVolume() int PulseMixer::GetVolumeInternal() { - pa_volume_t max_pa_volume = pa_volume_t(volume_scale_factor * PA_VOLUME_NORM); + auto max_pa_volume = pa_volume_t(volume_scale_factor * PA_VOLUME_NORM); return online ? (int)((100 * (pa_cvolume_avg(&volume) + 1)) / max_pa_volume) : -1; @@ -228,7 +228,7 @@ PulseMixer::SetVolume(unsigned new_volume) if (!online) throw std::runtime_error("disconnected"); - pa_volume_t max_pa_volume = pa_volume_t(volume_scale_factor * PA_VOLUME_NORM); + auto max_pa_volume = pa_volume_t(volume_scale_factor * PA_VOLUME_NORM); struct pa_cvolume cvolume; pa_cvolume_set(&cvolume, volume.channels, |