mirror of
https://github.com/yshui/picom.git
synced 2024-11-11 13:51:02 -05:00
config: refactor the parse_blur_method function
sort blur methods alphabetically and address some clang-tidy issues
This commit is contained in:
parent
2c83fb821b
commit
4a8b937c90
1 changed files with 11 additions and 7 deletions
18
src/config.c
18
src/config.c
|
@ -183,15 +183,19 @@ const char *parse_readnum(const char *src, double *dest) {
|
||||||
}
|
}
|
||||||
|
|
||||||
enum blur_method parse_blur_method(const char *src) {
|
enum blur_method parse_blur_method(const char *src) {
|
||||||
|
if (strcmp(src, "box") == 0) {
|
||||||
|
return BLUR_METHOD_BOX;
|
||||||
|
}
|
||||||
|
if (strcmp(src, "dual_kawase") == 0) {
|
||||||
|
return BLUR_METHOD_DUAL_KAWASE;
|
||||||
|
}
|
||||||
|
if (strcmp(src, "gaussian") == 0) {
|
||||||
|
return BLUR_METHOD_GAUSSIAN;
|
||||||
|
}
|
||||||
if (strcmp(src, "kernel") == 0) {
|
if (strcmp(src, "kernel") == 0) {
|
||||||
return BLUR_METHOD_KERNEL;
|
return BLUR_METHOD_KERNEL;
|
||||||
} else if (strcmp(src, "box") == 0) {
|
}
|
||||||
return BLUR_METHOD_BOX;
|
if (strcmp(src, "none") == 0) {
|
||||||
} else if (strcmp(src, "gaussian") == 0) {
|
|
||||||
return BLUR_METHOD_GAUSSIAN;
|
|
||||||
} else if (strcmp(src, "dual_kawase") == 0) {
|
|
||||||
return BLUR_METHOD_DUAL_KAWASE;
|
|
||||||
} else if (strcmp(src, "none") == 0) {
|
|
||||||
return BLUR_METHOD_NONE;
|
return BLUR_METHOD_NONE;
|
||||||
}
|
}
|
||||||
return BLUR_METHOD_INVALID;
|
return BLUR_METHOD_INVALID;
|
||||||
|
|
Loading…
Reference in a new issue