mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
treewide: mark things static and const
Mark some structures, arrays static/const at various places. In some cases this prevents unnecessary initialization when a function is entered. All in all, the text segments across all shared libraries are reduced by about 2 KiB. However, the total size increases by about 2 KiB as well.
This commit is contained in:
parent
48dbb4da3c
commit
f5d51162c4
54 changed files with 303 additions and 241 deletions
|
|
@ -1095,7 +1095,7 @@ static void client_node0_event(void *data, struct spa_event *event)
|
|||
}
|
||||
}
|
||||
|
||||
static struct pw_client_node0_methods client_node0_methods = {
|
||||
static const struct pw_client_node0_methods client_node0_methods = {
|
||||
PW_VERSION_CLIENT_NODE0_METHODS,
|
||||
.done = client_node0_done,
|
||||
.update = client_node0_update,
|
||||
|
|
@ -1303,12 +1303,13 @@ static const struct pw_resource_events resource_events = {
|
|||
|
||||
static void convert_properties(struct pw_properties *properties)
|
||||
{
|
||||
struct {
|
||||
static const struct {
|
||||
const char *from, *to;
|
||||
} props[] = {
|
||||
{ "pipewire.autoconnect", PW_KEY_NODE_AUTOCONNECT, },
|
||||
{ "pipewire.target.node", PW_KEY_NODE_TARGET, }
|
||||
};
|
||||
|
||||
uint32_t i;
|
||||
const char *str;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue