Introduce output_primary_name function
Currently simply returns output->name, but this will make it easier to change how output names are stored in the following commits. Also replace reading output->name with invocations of output_primary_name. Code which writes output->name is unchanged. Done using a mostly mechanical replacement of output->name to output_primary_name(output).
This commit is contained in:
@ -44,6 +44,14 @@ Output *get_output_from_string(Output *current_output, const char *output_str) {
|
||||
return get_output_by_name(output_str, true);
|
||||
}
|
||||
|
||||
/*
|
||||
* Retrieves the primary name of an output.
|
||||
*
|
||||
*/
|
||||
char *output_primary_name(Output *output) {
|
||||
return output->name;
|
||||
}
|
||||
|
||||
Output *get_output_for_con(Con *con) {
|
||||
Con *output_con = con_get_output(con);
|
||||
if (output_con == NULL) {
|
||||
|
Reference in New Issue
Block a user