1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-19 19:45:15 +00:00

Format code using 'make clang-format'

This commit is contained in:
Julian Schuler 2021-12-09 22:52:07 +01:00 committed by Brenden Matthews
parent 183b45c7ea
commit f11eb219ad
3 changed files with 25 additions and 29 deletions

View File

@ -660,12 +660,8 @@ struct text_object *construct_text_object(char *s, const char *arg, long line,
EQUAL) {
obj->data.i = PB_BATT_STATUS;
}
else if (strcmp(arg, "percent") == EQUAL) {
obj->data.i = PB_BATT_PERCENT;
}
else if (strcmp(arg, "time") == EQUAL) {
obj->data.i = PB_BATT_TIME;
}
else if (strcmp(arg, "percent") == EQUAL) { obj->data.i = PB_BATT_PERCENT; }
else if (strcmp(arg, "time") == EQUAL) { obj->data.i = PB_BATT_TIME; }
else {
NORM_ERR("pb_battery: illegal argument '%s', defaulting to status", arg);
obj->data.i = PB_BATT_STATUS;
@ -2013,7 +2009,8 @@ struct text_object *construct_text_object(char *s, const char *arg, long line,
END OBJ(pa_card_name, 0) obj->callbacks.print = &print_puau_card_name;
obj->callbacks.free = &free_pulseaudio;
init_pulseaudio(obj);
END OBJ_IF(if_pa_source_running, 0) obj->callbacks.iftest = &puau_source_running;
END OBJ_IF(if_pa_source_running, 0) obj->callbacks.iftest =
&puau_source_running;
obj->callbacks.free = &free_pulseaudio;
init_pulseaudio(obj);
END OBJ_IF(if_pa_source_muted, 0) obj->callbacks.iftest = &puau_source_muted;

View File

@ -40,7 +40,8 @@
struct pulseaudio_default_results get_result_copy();
const struct pulseaudio_default_results pulseaudio_result0 = {std::string(),
const struct pulseaudio_default_results pulseaudio_result0 = {
std::string(),
std::string(),
std::string(),
std::string(),
@ -80,7 +81,6 @@ void pa_sink_info_callback(pa_context *c, const pa_sink_info *i, int eol,
++eol;
}
void pa_source_info_callback(pa_context *c, const pa_source_info *i, int eol,
void *data) {
if (i != nullptr && data) {
@ -186,8 +186,9 @@ void subscribe_cb(pa_context *c, pa_subscription_event_type_t t, uint32_t index,
case PA_SUBSCRIPTION_EVENT_SOURCE: {
if (res->source_name.empty()) return;
pa_operation *op;
PULSEAUDIO_OP(pa_context_get_source_info_by_name(
c, res->source_name.c_str(), pa_source_info_callback, res),
PULSEAUDIO_OP(
pa_context_get_source_info_by_name(c, res->source_name.c_str(),
pa_source_info_callback, res),
"pa_context_get_source_info_by_name failed");
} break;

View File

@ -99,9 +99,7 @@ static void unhash_all_processes() {
}
}
struct process *get_first_process() {
return first_process;
}
struct process *get_first_process() { return first_process; }
void free_all_processes() {
struct process *next = nullptr, *pr = first_process;