Refactoring : Removed the function 'findtoken'

This commit is contained in:
Daniel Marjamäki 2008-12-20 16:33:14 +00:00
parent e0e84d53ac
commit 0a73591c5c
2 changed files with 0 additions and 22 deletions

View File

@ -318,27 +318,6 @@ const TOKEN *TOKEN::findmatch(const TOKEN *tok, const char pattern[], const char
return 0; return 0;
} }
const TOKEN *TOKEN::findtoken(const TOKEN *tok1, const char *tokenstr[])
{
for (const TOKEN *ret = tok1; ret; ret = ret->next())
{
unsigned int i = 0;
const TOKEN *tok = ret;
while (tokenstr[i])
{
if (!tok)
return NULL;
if (*(tokenstr[i]) && (tokenstr[i] != tok->_str))
break;
tok = tok->next();
i++;
}
if (!tokenstr[i])
return ret;
}
return NULL;
}
unsigned int TOKEN::varId() const unsigned int TOKEN::varId() const
{ {
return _varId; return _varId;

View File

@ -98,7 +98,6 @@ public:
bool isNumber() const; bool isNumber() const;
bool isStandardType() const; bool isStandardType() const;
static const TOKEN *findmatch(const TOKEN *tok, const char pattern[], const char *varname1[]=0, const char *varname2[]=0); static const TOKEN *findmatch(const TOKEN *tok, const char pattern[], const char *varname1[]=0, const char *varname2[]=0);
static const TOKEN *findtoken(const TOKEN *tok1, const char *tokenstr[]);
/** /**
* Needle is build from multiple alternatives. If one of * Needle is build from multiple alternatives. If one of