Skip to content

Commit

Permalink
Removed all auto variables to make code more readable
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikReider committed Aug 28, 2021
1 parent ae7bec6 commit 3ff4c42
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@ struct Data {

void sink_input_info_callback(pa_context *, const pa_sink_input_info *i, int,
void *userdata) {
auto *data = (Data *)userdata;
Data *data = (Data *)userdata;
if (i && !i->corked) data->activeSink = true;
pa_threaded_mainloop_signal(data->mainloop, 0);
}

void source_output_info_callback(pa_context *, const pa_source_output_info *i,
int, void *userdata) {
auto *data = (Data *)userdata;
Data *data = (Data *)userdata;
if (i && !i->corked) data->activeSource = true;
pa_threaded_mainloop_signal(data->mainloop, 0);
}
Expand Down Expand Up @@ -106,7 +106,7 @@ void getRunning(EventType eventType, Data *data, pa_context *context) {

void subscribe_callback(pa_context *, pa_subscription_event_type_t type,
uint32_t, void *userdata) {
auto *data = (Data *)userdata;
Data *data = (Data *)userdata;
bool isBoth = data->subscriptionType == SUBSCRIPTION_TYPE_BOTH;
switch (type & PA_SUBSCRIPTION_EVENT_FACILITY_MASK) {
case PA_SUBSCRIPTION_EVENT_SINK:
Expand All @@ -121,7 +121,7 @@ void subscribe_callback(pa_context *, pa_subscription_event_type_t type,
}

void context_state_callback(pa_context *c, void *userdata) {
auto *data = (Data *)userdata;
Data *data = (Data *)userdata;
switch (pa_context_get_state(c)) {
case PA_CONTEXT_CONNECTING:
case PA_CONTEXT_AUTHORIZING:
Expand Down

0 comments on commit 3ff4c42

Please sign in to comment.