diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2019-10-16 11:36:01 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2019-10-16 11:36:01 +0300 |
commit | c2fbe46b0f0fde44b8a40d89601a195da27d28fb (patch) | |
tree | f66e3e50758acb36001e2774c6e4ede5fc8bead6 /source/blender/editors/space_text/text_format_osl.c | |
parent | 386ba094988fc793f8e060d15438566e5e2d2cae (diff) | |
parent | dcf57e34f3866bba5ddd9cfdfe858a1a5eedc4c2 (diff) |
Merge branch 'master' into temp-gpencil-drw-enginetemp-gpencil-drw-engine
Diffstat (limited to 'source/blender/editors/space_text/text_format_osl.c')
-rw-r--r-- | source/blender/editors/space_text/text_format_osl.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/space_text/text_format_osl.c b/source/blender/editors/space_text/text_format_osl.c index fb9ddcb09cb..2da4488e901 100644 --- a/source/blender/editors/space_text/text_format_osl.c +++ b/source/blender/editors/space_text/text_format_osl.c @@ -40,7 +40,7 @@ static int txtfmt_osl_find_builtinfunc(const char *string) /* list is from * https://github.com/imageworks/OpenShadingLanguage/raw/master/src/doc/osl-languagespec.pdf */ - if (STR_LITERAL_STARTSWITH(string, "break", len)) { i = len; + if (STR_LITERAL_STARTSWITH(string, "break", len)) { i = len; } else if (STR_LITERAL_STARTSWITH(string, "closure", len)) { i = len; } else if (STR_LITERAL_STARTSWITH(string, "color", len)) { i = len; } else if (STR_LITERAL_STARTSWITH(string, "continue", len)) { i = len; @@ -86,7 +86,7 @@ static int txtfmt_osl_find_reserved(const char *string) /* list is from... * https://github.com/imageworks/OpenShadingLanguage/raw/master/src/doc/osl-languagespec.pdf */ - if (STR_LITERAL_STARTSWITH(string, "bool", len)) { i = len; + if (STR_LITERAL_STARTSWITH(string, "bool", len)) { i = len; } else if (STR_LITERAL_STARTSWITH(string, "case", len)) { i = len; } else if (STR_LITERAL_STARTSWITH(string, "catch", len)) { i = len; } else if (STR_LITERAL_STARTSWITH(string, "char", len)) { i = len; @@ -149,7 +149,7 @@ static int txtfmt_osl_find_specialvar(const char *string) /* clang-format off */ /* OSL shader types */ - if (STR_LITERAL_STARTSWITH(string, "shader", len)) { i = len; + if (STR_LITERAL_STARTSWITH(string, "shader", len)) { i = len; } else if (STR_LITERAL_STARTSWITH(string, "surface", len)) { i = len; } else if (STR_LITERAL_STARTSWITH(string, "volume", len)) { i = len; } else if (STR_LITERAL_STARTSWITH(string, "displacement", len)) { i = len; @@ -189,7 +189,7 @@ static char txtfmt_osl_format_identifier(const char *str) /* Keep aligned args for readability. */ /* clang-format off */ - if ((txtfmt_osl_find_specialvar(str)) != -1) { fmt = FMT_TYPE_SPECIAL; + if ((txtfmt_osl_find_specialvar(str)) != -1) { fmt = FMT_TYPE_SPECIAL; } else if ((txtfmt_osl_find_builtinfunc(str)) != -1) { fmt = FMT_TYPE_KEYWORD; } else if ((txtfmt_osl_find_reserved(str)) != -1) { fmt = FMT_TYPE_RESERVED; } else if ((txtfmt_osl_find_preprocessor(str)) != -1) { fmt = FMT_TYPE_DIRECTIVE; @@ -323,7 +323,7 @@ static void txtfmt_osl_format_line(SpaceText *st, TextLine *line, const bool do_ /* Special vars(v) or built-in keywords(b) */ /* keep in sync with 'txtfmt_osl_format_identifier()' */ - if ((i = txtfmt_osl_find_specialvar(str)) != -1) { prev = FMT_TYPE_SPECIAL; + if ((i = txtfmt_osl_find_specialvar(str)) != -1) { prev = FMT_TYPE_SPECIAL; } else if ((i = txtfmt_osl_find_builtinfunc(str)) != -1) { prev = FMT_TYPE_KEYWORD; } else if ((i = txtfmt_osl_find_reserved(str)) != -1) { prev = FMT_TYPE_RESERVED; } else if ((i = txtfmt_osl_find_preprocessor(str)) != -1) { prev = FMT_TYPE_DIRECTIVE; |