summaryrefslogtreecommitdiffstats
path: root/src/util.cpp
diff options
context:
space:
mode:
authorAdrian Negreanu <adrian.m.negreanu@intel.com>2013-09-10 12:48:00 (GMT)
committerAdrian Negreanu <adrian.m.negreanu@intel.com>2013-09-10 12:48:03 (GMT)
commit40153a83f9bddb54add6a7247cf22fbc8e36dc10 (patch)
tree6f1d8880630e368b02b1d5412f0f4920482ba6a8 /src/util.cpp
parent1e373422387e8c1131f887efb47cf3da6459e2ac (diff)
downloadDoxygen-40153a83f9bddb54add6a7247cf22fbc8e36dc10.zip
Doxygen-40153a83f9bddb54add6a7247cf22fbc8e36dc10.tar.gz
Doxygen-40153a83f9bddb54add6a7247cf22fbc8e36dc10.tar.bz2
consider currentFile when searching for global symbols
Signed-off-by: Adrian Negreanu <adrian.m.negreanu@intel.com>
Diffstat (limited to 'src/util.cpp')
-rw-r--r--src/util.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/util.cpp b/src/util.cpp
index e67e9fb..83eb095 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -4307,7 +4307,20 @@ bool getDefs(const QCString &scName,
//printf("found %d candidate members\n",members.count());
if (members.count()>0) // at least one match
{
- md=members.last();
+ if (currentFile)
+ {
+ //printf("multiple results; pick one from file:%s\n", currentFile->name().data());
+ md = members.first();
+ while (md) {
+ if (md->getFileDef()->name() == currentFile->name())
+ break;
+ md=members.next();
+ }
+ if (!md)
+ md=members.last();
+ } else {
+ md=members.last();
+ }
}
if (md && (md->getEnumScope()==0 || !md->getEnumScope()->isStrong()))
// found a matching global member, that is not a scoped enum value (or uniquely matches)