From 32cfdf75e631925acd05de73879d2e879030e7bd Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Mon, 6 Jun 2016 08:25:01 -0400 Subject: use 'auto' more for obvious decls --- pulse.cc | 12 ++++++------ 1 file 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(raw); + auto state = static_cast(raw); *state = pa_context_get_state(context); } void success_cb(pa_context* context, int success, void* raw) { - int *r = static_cast(raw); + auto r = static_cast(raw); *r = success; if (!success) { fprintf(stderr, @@ -38,7 +38,7 @@ void card_info_cb(pa_context* context, } if (!eol) { - std::vector* cards = static_cast*>(raw); + auto cards = static_cast*>(raw); cards->push_back(info); } } @@ -55,15 +55,15 @@ void device_info_cb(pa_context* context, } if (!eol) { - std::vector* devices_ = static_cast*>(raw); - devices_->push_back(info); + auto devices = static_cast*>(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(raw); + auto defaults = static_cast(raw); defaults->sink = i->default_sink_name; defaults->source = i->default_source_name; } -- cgit v1.2.3