diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-05-01 22:48:57 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-05-01 22:48:57 +1000 |
commit | cb07434913b89580a4025824cb181733b2db1eb7 (patch) | |
tree | c2c7e713a150c7f9a947b100e0fa4c56efb5c3b2 /sway/commands/client.c | |
parent | Update cursor when border is changed (diff) | |
download | sway-cb07434913b89580a4025824cb181733b2db1eb7.tar.gz sway-cb07434913b89580a4025824cb181733b2db1eb7.tar.zst sway-cb07434913b89580a4025824cb181733b2db1eb7.zip |
Remove unnecessary pointers
Diffstat (limited to 'sway/commands/client.c')
-rw-r--r-- | sway/commands/client.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/sway/commands/client.c b/sway/commands/client.c index ce519381..156ff95c 100644 --- a/sway/commands/client.c +++ b/sway/commands/client.c | |||
@@ -3,7 +3,7 @@ | |||
3 | #include "sway/config.h" | 3 | #include "sway/config.h" |
4 | #include "sway/tree/container.h" | 4 | #include "sway/tree/container.h" |
5 | 5 | ||
6 | static bool parse_color(char *hexstring, float (*dest)[4]) { | 6 | static bool parse_color(char *hexstring, float dest[static 4]) { |
7 | if (hexstring[0] != '#') { | 7 | if (hexstring[0] != '#') { |
8 | return false; | 8 | return false; |
9 | } | 9 | } |
@@ -20,10 +20,10 @@ static bool parse_color(char *hexstring, float (*dest)[4]) { | |||
20 | return false; | 20 | return false; |
21 | } | 21 | } |
22 | 22 | ||
23 | (*dest)[0] = ((decimal >> 16) & 0xff) / 255.0; | 23 | dest[0] = ((decimal >> 16) & 0xff) / 255.0; |
24 | (*dest)[1] = ((decimal >> 8) & 0xff) / 255.0; | 24 | dest[1] = ((decimal >> 8) & 0xff) / 255.0; |
25 | (*dest)[2] = (decimal & 0xff) / 255.0; | 25 | dest[2] = (decimal & 0xff) / 255.0; |
26 | (*dest)[3] = 1.0; | 26 | dest[3] = 1.0; |
27 | return true; | 27 | return true; |
28 | } | 28 | } |
29 | 29 | ||
@@ -34,27 +34,27 @@ static struct cmd_results *handle_command(int argc, char **argv, | |||
34 | return error; | 34 | return error; |
35 | } | 35 | } |
36 | 36 | ||
37 | if (!parse_color(argv[0], &class->border)) { | 37 | if (!parse_color(argv[0], class->border)) { |
38 | return cmd_results_new(CMD_INVALID, cmd_name, | 38 | return cmd_results_new(CMD_INVALID, cmd_name, |
39 | "Unable to parse border color"); | 39 | "Unable to parse border color"); |
40 | } | 40 | } |
41 | 41 | ||
42 | if (!parse_color(argv[1], &class->background)) { | 42 | if (!parse_color(argv[1], class->background)) { |
43 | return cmd_results_new(CMD_INVALID, cmd_name, | 43 | return cmd_results_new(CMD_INVALID, cmd_name, |
44 | "Unable to parse background color"); | 44 | "Unable to parse background color"); |
45 | } | 45 | } |
46 | 46 | ||
47 | if (!parse_color(argv[2], &class->text)) { | 47 | if (!parse_color(argv[2], class->text)) { |
48 | return cmd_results_new(CMD_INVALID, cmd_name, | 48 | return cmd_results_new(CMD_INVALID, cmd_name, |
49 | "Unable to parse text color"); | 49 | "Unable to parse text color"); |
50 | } | 50 | } |
51 | 51 | ||
52 | if (!parse_color(argv[3], &class->indicator)) { | 52 | if (!parse_color(argv[3], class->indicator)) { |
53 | return cmd_results_new(CMD_INVALID, cmd_name, | 53 | return cmd_results_new(CMD_INVALID, cmd_name, |
54 | "Unable to parse indicator color"); | 54 | "Unable to parse indicator color"); |
55 | } | 55 | } |
56 | 56 | ||
57 | if (!parse_color(argv[4], &class->child_border)) { | 57 | if (!parse_color(argv[4], class->child_border)) { |
58 | return cmd_results_new(CMD_INVALID, cmd_name, | 58 | return cmd_results_new(CMD_INVALID, cmd_name, |
59 | "Unable to parse child border color"); | 59 | "Unable to parse child border color"); |
60 | } | 60 | } |