From 17921545bc5f93c92fba132b92583e178e81ae83 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Mon, 23 Dec 2019 01:34:24 +0000 Subject: [PATCH] avoid sorting and one condition in exportscan() function in genmap.py script Signed-off-by: Ivailo Monev --- scripts/genmap.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/genmap.py b/scripts/genmap.py index 88813e2f9..df5e045bb 100755 --- a/scripts/genmap.py +++ b/scripts/genmap.py @@ -23,8 +23,8 @@ classesmap = OrderedDict() def exportscan(sdir, pattern, component): regex = re.compile('(?:class|struct) (?:%s) (\w+)' % pattern) for sroot, sdir, lfiles in os.walk(sdir): - for sfile in sorted(lfiles): - if not sfile.endswith('.h') or sfile.endswith('_p.h'): + for sfile in lfiles: + if not sfile.endswith(('.h', '_p.h')): continue sfull = '%s/%s' % (sroot, sfile) with open(sfull, 'rb') as f: -- 2.11.0