Codechange: Use begin/end of nwidget parts of begin/length.
This simplifies processing nwidget parts as, unlike the remaining length, the pointer to the end of the list never changes. This is the same principle as we use(d) for tracking end instead of length for C-style strings. And this removes 160~ instances of the lengthof() macro.
This commit is contained in:
2
.github/windowdesc-ini-key.py
vendored
2
.github/windowdesc-ini-key.py
vendored
@@ -22,7 +22,7 @@ def scan_source_files(path, ini_keys=None):
|
||||
with open(new_path) as fp:
|
||||
output = fp.read()
|
||||
|
||||
for (name, ini_key, widgets) in re.findall(r"^static WindowDesc ([a-zA-Z0-9_]*).*?, (?:\"(.*?)\")?.*?,(?:\s+(.*?),){6}", output, re.S|re.M):
|
||||
for (name, ini_key, widgets) in re.findall(r"^static WindowDesc ([a-zA-Z0-9_]*).*?, (?:\"(.*?)\")?.*?,(?:\s+.*?,){6}\s+[^\s]+\((.*?)\)", output, re.S|re.M):
|
||||
if ini_key:
|
||||
if ini_key in ini_keys:
|
||||
errors.append(f"{new_path}: {name} ini_key is a duplicate")
|
||||
|
||||
Reference in New Issue
Block a user