summaryrefslogtreecommitdiffstats
path: root/input/input.h
diff options
context:
space:
mode:
authorwm4 <wm4@mplayer2.org>2012-01-26 00:01:49 +0100
committerwm4 <wm4@mplayer2.org>2012-01-26 03:06:59 +0100
commit02fedc7bab73f0b68da34572b1f05dd463def2a9 (patch)
tree458690082007eca9ce389806b6d8effed161414c /input/input.h
parentd5a8059f93795e3a8e1357ea7b15002ce5fd0125 (diff)
downloadmpv-02fedc7bab73f0b68da34572b1f05dd463def2a9.tar.bz2
mpv-02fedc7bab73f0b68da34572b1f05dd463def2a9.tar.xz
input.c: simplify command definitions
Using type = -1 for terminating the command argument list was an unnecessary complication. Change it to 0 to make use of default initialization. Remove the explicit termination from the command definitions. Now the argument list is automatically terminated by C default initialization rules. Also remove other redundant {0} initializers. When an argument's default value is actually initialized to something other than 0, make the field being initialized explicit (e.g. {1} becomes {.i = 1}). Try to make use of whitespace more consistent.
Diffstat (limited to 'input/input.h')
-rw-r--r--input/input.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/input/input.h b/input/input.h
index 8d32a9907c..99a69c7355 100644
--- a/input/input.h
+++ b/input/input.h
@@ -153,10 +153,10 @@ enum mp_command_type {
};
// The arg types
-#define MP_CMD_ARG_INT 0
-#define MP_CMD_ARG_FLOAT 1
-#define MP_CMD_ARG_STRING 2
-#define MP_CMD_ARG_VOID 3
+#define MP_CMD_ARG_VOID 0
+#define MP_CMD_ARG_INT 1
+#define MP_CMD_ARG_FLOAT 2
+#define MP_CMD_ARG_STRING 3
#ifndef MP_CMD_MAX_ARGS
#define MP_CMD_MAX_ARGS 10
@@ -184,7 +184,6 @@ struct mp_cmd_arg {
int i;
float f;
char *s;
- void *v;
} v;
};