aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2016-06-06 08:25:01 -0400
committerDave Reisner <dreisner@archlinux.org>2016-06-06 08:25:01 -0400
commit32cfdf75e631925acd05de73879d2e879030e7bd (patch)
tree65e58022461e3affaa9c3e914183a2fa590fcca4
parent08cbab4c6c95ddeb3ce74e9b2c48c00bbb6ba967 (diff)
downloadmirror-ponymix-32cfdf75e631925acd05de73879d2e879030e7bd.tar.gz
mirror-ponymix-32cfdf75e631925acd05de73879d2e879030e7bd.tar.bz2
mirror-ponymix-32cfdf75e631925acd05de73879d2e879030e7bd.zip
use 'auto' more for obvious decls
-rw-r--r--pulse.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/pulse.cc b/pulse.cc
index e225a82..8d55a19 100644
--- a/pulse.cc
+++ b/pulse.cc
@@ -13,12 +13,12 @@
namespace {
void connect_state_cb(pa_context* context, void* raw) {
- enum pa_context_state *state = static_cast<enum pa_context_state*>(raw);
+ auto state = static_cast<enum pa_context_state*>(raw);
*state = pa_context_get_state(context);
}
void success_cb(pa_context* context, int success, void* raw) {
- int *r = static_cast<int*>(raw);
+ auto r = static_cast<int*>(raw);
*r = success;
if (!success) {
fprintf(stderr,
@@ -38,7 +38,7 @@ void card_info_cb(pa_context* context,
}
if (!eol) {
- std::vector<Card>* cards = static_cast<std::vector<Card>*>(raw);
+ auto cards = static_cast<std::vector<Card>*>(raw);
cards->push_back(info);
}
}
@@ -55,15 +55,15 @@ void device_info_cb(pa_context* context,
}
if (!eol) {
- std::vector<Device>* devices_ = static_cast<std::vector<Device>*>(raw);
- devices_->push_back(info);
+ auto devices = static_cast<std::vector<Device>*>(raw);
+ devices->push_back(info);
}
}
void server_info_cb(pa_context* context __attribute__((unused)),
const pa_server_info* i,
void* raw) {
- ServerInfo* defaults = static_cast<ServerInfo*>(raw);
+ auto defaults = static_cast<ServerInfo*>(raw);
defaults->sink = i->default_sink_name;
defaults->source = i->default_source_name;
}