[geany/geany] 30fa28: Don't use enums for scoped search
Jiří Techet
git-noreply at xxxxx
Thu Feb 11 14:35:54 UTC 2016
Branch: refs/heads/master
Author: Jiří Techet <techet at gmail.com>
Committer: Jiří Techet <techet at gmail.com>
Date: Sun, 10 Jan 2016 11:31:47 UTC
Commit: 30fa28bac7d8c5928dd613c34d5d833b3dfead2b
https://github.com/geany/geany/commit/30fa28bac7d8c5928dd613c34d5d833b3dfead2b
Log Message:
-----------
Don't use enums for scoped search
Even though enums contain members, their members are accessed in a
different way than members of classes and structs. E.g. consider:
typedef enum {A, B, C, D} MyEnum;
Variable of this type is declared as
MyEnum myVar;
myVar can be assigned a value from MyEnum; however, we don't access myVar
over the dot operator so we don't need the list of all members after
typing
myVar.
This patch eliminates some false positives after typing .
Modified Paths:
--------------
tagmanager/src/tm_workspace.c
Modified: tagmanager/src/tm_workspace.c
5 lines changed, 2 insertions(+), 3 deletions(-)
===================================================================
@@ -59,7 +59,7 @@ static TMTagAttrType global_tags_sort_attrs[] =
static TMTagType TM_MEMBER_TYPE_MASK =
tm_tag_function_t | tm_tag_prototype_t |
tm_tag_member_t | tm_tag_field_t |
- tm_tag_method_t | tm_tag_enumerator_t;
+ tm_tag_method_t;
static TMWorkspace *theWorkspace = NULL;
@@ -824,8 +824,7 @@ find_scope_members (const GPtrArray *tags_array, GPtrArray *member_array,
TMTag *tag = NULL;
GPtrArray *type_tags;
TMTagType types = (tm_tag_class_t | tm_tag_namespace_t |
- tm_tag_struct_t | tm_tag_typedef_t |
- tm_tag_union_t | tm_tag_enum_t);
+ tm_tag_struct_t | tm_tag_union_t | tm_tag_typedef_t);
type_tags = g_ptr_array_new();
if (typedef_file)
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
More information about the Commits
mailing list