diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-12-10 06:52:11 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-12-10 06:55:28 +0300 |
commit | aef9243ebb4f3d97d4d9f0eb731250a8c6c1db28 (patch) | |
tree | b3773e8412190cf806f98e229d80dde2ce928b13 /source/blender/makesrna/intern/rna_access.c | |
parent | ed2556e22cc2d3629833bdc39ec1852ee5c4470e (diff) |
Cleanup: remove unnecessary vars in RNA token reading
Diffstat (limited to 'source/blender/makesrna/intern/rna_access.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_access.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c index 67f88d31afd..70b4d4204df 100644 --- a/source/blender/makesrna/intern/rna_access.c +++ b/source/blender/makesrna/intern/rna_access.c @@ -4970,14 +4970,8 @@ static char *rna_path_token(const char **path, char *fixedbuf, int fixedlen, int p = *path; - /* 2 kinds of lookups now, quoted or unquoted */ - char quote = *p; - - if (quote != '"') { - quote = 0; - } - - if (quote == 0) { + /* 2 kinds of look-ups now, quoted or unquoted. */ + if (*p != '"') { while (*p && (*p != ']')) { len++; p++; @@ -4985,10 +4979,10 @@ static char *rna_path_token(const char **path, char *fixedbuf, int fixedlen, int } else { bool escape = false; - /* skip the first quote */ + /* Skip the first quote. */ len++; p++; - while (*p && (*p != quote || escape)) { + while (*p && (*p != '"' || escape)) { /* A pair of back-slashes represents a single back-slash, * only use a single back-slash for escaping. */ escape = (escape == false) && (*p == '\\'); @@ -4996,7 +4990,7 @@ static char *rna_path_token(const char **path, char *fixedbuf, int fixedlen, int p++; } - /* skip the last quoted char to get the ']' */ + /* Skip the last quoted char to get the `]`. */ len++; p++; } |