mirror of
https://github.com/webmproject/libwebp.git
synced 2025-08-28 14:52:28 +02:00
examples/{webpmux,unicode}: simplify W_CHAR casts
in calls to `LOCAL_FREE()`: `(W_CHAR** const) -> (W_CHAR**)`. This will improve formatting when clang-format is applied. Bug: 433996651 Change-Id: I54e62206c83473e9369b8c67fb8d6c44d7808d52
This commit is contained in:
@@ -48,7 +48,7 @@
|
|||||||
#define GET_WARGV_OR_NULL() wargv
|
#define GET_WARGV_OR_NULL() wargv
|
||||||
|
|
||||||
// Release resources. LocalFree() is needed after CommandLineToArgvW().
|
// Release resources. LocalFree() is needed after CommandLineToArgvW().
|
||||||
#define FREE_WARGV() LOCAL_FREE((W_CHAR** const)wargv)
|
#define FREE_WARGV() LOCAL_FREE((W_CHAR**)wargv)
|
||||||
#define LOCAL_FREE(WARGV) \
|
#define LOCAL_FREE(WARGV) \
|
||||||
do { \
|
do { \
|
||||||
if ((WARGV) != NULL) LocalFree(WARGV); \
|
if ((WARGV) != NULL) LocalFree(WARGV); \
|
||||||
|
@@ -735,14 +735,14 @@ static int ParseCommandLine(Config* config, const W_CHAR** const unicode_argv) {
|
|||||||
} else if (!strcmp(argv[i], "-h") || !strcmp(argv[i], "-help")) {
|
} else if (!strcmp(argv[i], "-h") || !strcmp(argv[i], "-help")) {
|
||||||
PrintHelp();
|
PrintHelp();
|
||||||
DeleteConfig(config);
|
DeleteConfig(config);
|
||||||
LOCAL_FREE((W_CHAR** const)unicode_argv);
|
LOCAL_FREE((W_CHAR**)unicode_argv);
|
||||||
exit(0);
|
exit(0);
|
||||||
} else if (!strcmp(argv[i], "-version")) {
|
} else if (!strcmp(argv[i], "-version")) {
|
||||||
const int version = WebPGetMuxVersion();
|
const int version = WebPGetMuxVersion();
|
||||||
printf("%d.%d.%d\n",
|
printf("%d.%d.%d\n",
|
||||||
(version >> 16) & 0xff, (version >> 8) & 0xff, version & 0xff);
|
(version >> 16) & 0xff, (version >> 8) & 0xff, version & 0xff);
|
||||||
DeleteConfig(config);
|
DeleteConfig(config);
|
||||||
LOCAL_FREE((W_CHAR** const)unicode_argv);
|
LOCAL_FREE((W_CHAR**)unicode_argv);
|
||||||
exit(0);
|
exit(0);
|
||||||
} else if (!strcmp(argv[i], "--")) {
|
} else if (!strcmp(argv[i], "--")) {
|
||||||
if (i < argc - 1) {
|
if (i < argc - 1) {
|
||||||
|
Reference in New Issue
Block a user