From 1be03f5cfc276d79dfbae867efe75e8e84276328 Mon Sep 17 00:00:00 2001 From: John Camelon Date: Fri, 25 Jul 2003 17:25:49 +0000 Subject: [PATCH] Last minute demo fix from Bogdan. --- core/org.eclipse.cdt.core/search/ChangeLog | 1 + .../core/search/matching/FunctionDeclarationPattern.java | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/core/org.eclipse.cdt.core/search/ChangeLog b/core/org.eclipse.cdt.core/search/ChangeLog index 403f93c637b..ceba85da5e8 100644 --- a/core/org.eclipse.cdt.core/search/ChangeLog +++ b/core/org.eclipse.cdt.core/search/ChangeLog @@ -1,6 +1,7 @@ 2003-07-25 Bogdan Gheorghe - Added refs to PathCollector - Filled in feedIndexRequestor for the new search patterns + - Fixed the FunctionDeclarationPattern to work with no parms 2003-07-24 Andrew Niefer - Implemented decodeIndexEntry & matchIndexEntry for all patterns diff --git a/core/org.eclipse.cdt.core/search/org/eclipse/cdt/internal/core/search/matching/FunctionDeclarationPattern.java b/core/org.eclipse.cdt.core/search/org/eclipse/cdt/internal/core/search/matching/FunctionDeclarationPattern.java index ef8ad6c649c..d5c6313808f 100644 --- a/core/org.eclipse.cdt.core/search/org/eclipse/cdt/internal/core/search/matching/FunctionDeclarationPattern.java +++ b/core/org.eclipse.cdt.core/search/org/eclipse/cdt/internal/core/search/matching/FunctionDeclarationPattern.java @@ -67,10 +67,12 @@ public class FunctionDeclarationPattern extends CSearchPattern { return IMPOSSIBLE_MATCH; } - if( parameterNames != null && parameterNames.length > 0 ){ + if( parameterNames != null && + parameterNames.length > 0 && + parameterNames[0].length > 0 + ){ Iterator params = function.getParameters(); - for( int i = 0; i < parameterNames.length; i++ ){ //if this function doesn't have this many parameters, it is not a match.