Commit 504853de3b6821c916a50e8dbe11c7c9aca0ffab

Ran Benita 2012-09-24T09:14:35

symbols: remove unneeded optimization The levels will be resized to the number of levels of the type anyway, so removing useless levels from the end here is unneeded. Signed-off-by: Ran Benita <ran234@gmail.com>

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/src/xkbcomp/symbols.c b/src/xkbcomp/symbols.c
index 7ef5722..09d577e 100644
--- a/src/xkbcomp/symbols.c
+++ b/src/xkbcomp/symbols.c
@@ -808,10 +808,6 @@ AddSymbolsToKey(SymbolsInfo *info, KeyInfo *keyi, ExprDef *arrayNdx,
         }
     }
 
-    for (j = darray_size(groupi->levels) - 1;
-         j >= 0 && darray_item(groupi->levels, j).num_syms == 0; j--)
-        (void) darray_pop(groupi->levels);
-
     return true;
 }