rtags.py
branchstable
changeset 5843 85c4d5334f2c
parent 5424 8ecbcbff9777
child 6240 fd0cbb801007
--- a/rtags.py	Tue Jun 22 13:47:13 2010 +0200
+++ b/rtags.py	Tue Jun 22 13:47:35 2010 +0200
@@ -82,16 +82,14 @@
         self._tagdefs.clear()
 
     def _get_keys(self, stype, rtype, otype, tagged):
-        keys = [('*', rtype, '*', tagged),
-                ('*', rtype, otype, tagged),
-                (stype, rtype, '*', tagged),
-                (stype, rtype, otype, tagged)]
-        if stype == '*' or otype == '*':
-            keys.remove( ('*', rtype, '*', tagged) )
-            if stype == '*':
-                keys.remove( ('*', rtype, otype, tagged) )
-            if otype == '*':
-                keys.remove( (stype, rtype, '*', tagged) )
+        keys = []
+        if '*' not in (stype, otype):
+            keys.append(('*', rtype, '*', tagged))
+        if '*' != stype:
+            keys.append(('*', rtype, otype, tagged))
+        if '*' != otype:
+            keys.append((stype, rtype, '*', tagged))
+        keys.append((stype, rtype, otype, tagged))
         return keys
 
     def init(self, schema, check=True):