diff options
author | Manuel Stoeckl <code@mstoeckl.com> | 2021-02-02 19:54:35 -0500 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2021-02-04 09:49:06 +0100 |
commit | cb3c7276324b5b0862088df9ffe5498998edae91 (patch) | |
tree | b4576f3715e53300794f92e4c6339df0ac1e447a /sway/commands/bar.c | |
parent | xdg-foreign: add v1 and v2 implementations (diff) | |
download | sway-cb3c7276324b5b0862088df9ffe5498998edae91.tar.gz sway-cb3c7276324b5b0862088df9ffe5498998edae91.tar.zst sway-cb3c7276324b5b0862088df9ffe5498998edae91.zip |
Declare all struct cmd_handler arrays const
And make the functions handling these arrays use const types.
Diffstat (limited to 'sway/commands/bar.c')
-rw-r--r-- | sway/commands/bar.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sway/commands/bar.c b/sway/commands/bar.c index d42b7fc2..a58f5438 100644 --- a/sway/commands/bar.c +++ b/sway/commands/bar.c | |||
@@ -8,7 +8,7 @@ | |||
8 | #include "log.h" | 8 | #include "log.h" |
9 | 9 | ||
10 | // Must be in alphabetical order for bsearch | 10 | // Must be in alphabetical order for bsearch |
11 | static struct cmd_handler bar_handlers[] = { | 11 | static const struct cmd_handler bar_handlers[] = { |
12 | { "bindcode", bar_cmd_bindcode }, | 12 | { "bindcode", bar_cmd_bindcode }, |
13 | { "binding_mode_indicator", bar_cmd_binding_mode_indicator }, | 13 | { "binding_mode_indicator", bar_cmd_binding_mode_indicator }, |
14 | { "bindsym", bar_cmd_bindsym }, | 14 | { "bindsym", bar_cmd_bindsym }, |
@@ -41,7 +41,7 @@ static struct cmd_handler bar_handlers[] = { | |||
41 | }; | 41 | }; |
42 | 42 | ||
43 | // Must be in alphabetical order for bsearch | 43 | // Must be in alphabetical order for bsearch |
44 | static struct cmd_handler bar_config_handlers[] = { | 44 | static const struct cmd_handler bar_config_handlers[] = { |
45 | { "id", bar_cmd_id }, | 45 | { "id", bar_cmd_id }, |
46 | { "swaybar_command", bar_cmd_swaybar_command }, | 46 | { "swaybar_command", bar_cmd_swaybar_command }, |
47 | }; | 47 | }; |