Commit 52957d05 authored by Rafaël Carré's avatar Rafaël Carré

dbus: prefer char[][] to *char[]

makes data smaller:
 no need to store pointers to each item of the array

char *x[] = { "a", "b", "c" };
memory looks like => "a" "b" "c" (&x) &a &b &c

char x[][2] = { "a", "b", "c" };
memory looks like => (&x) "a" "b" "c"
parent cc9602fe
...@@ -37,13 +37,13 @@ ...@@ -37,13 +37,13 @@
#include "dbus_root.h" #include "dbus_root.h"
#include "dbus_common.h" #include "dbus_common.h"
static const char* ppsz_supported_uri_schemes[] = { static const char const ppsz_supported_uri_schemes[][9] = {
"file", "http", "https", "rtsp", "realrtsp", "pnm", "ftp", "mtp", "smb", "file", "http", "https", "rtsp", "realrtsp", "pnm", "ftp", "mtp", "smb",
"mms", "mmsu", "mmst", "mmsh", "unsv", "itpc", "icyx", "rtmp", "rtp", "mms", "mmsu", "mmst", "mmsh", "unsv", "itpc", "icyx", "rtmp", "rtp",
"dccp", "dvd", "vcd", "vcdx" "dccp", "dvd", "vcd", "vcdx"
}; };
static const char* ppsz_supported_mime_types[] = { static const char const ppsz_supported_mime_types[][26] = {
"audio/mpeg", "audio/x-mpeg", "audio/mpeg", "audio/x-mpeg",
"video/mpeg", "video/x-mpeg", "video/mpeg", "video/x-mpeg",
"video/mpeg-system", "video/x-mpeg-system", "video/mpeg-system", "video/x-mpeg-system",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment