Bring declarations closer to where they're needed.
This commit is contained in:
parent
65e9085b66
commit
f104aa237f
|
@ -1428,13 +1428,8 @@ Function* SymbolDatabase::addGlobalFunctionDecl(Scope*& scope, const Token *tok,
|
|||
|
||||
void SymbolDatabase::addClassFunction(Scope **scope, const Token **tok, const Token *argStart)
|
||||
{
|
||||
int count = 0;
|
||||
std::string path;
|
||||
unsigned int path_length = 0;
|
||||
const Token *tok1;
|
||||
|
||||
const bool destructor((*tok)->previous()->str() == "~");
|
||||
|
||||
const Token *tok1;
|
||||
// skip class/struct name
|
||||
if (destructor)
|
||||
tok1 = (*tok)->tokAt(-3);
|
||||
|
@ -1445,6 +1440,10 @@ void SymbolDatabase::addClassFunction(Scope **scope, const Token **tok, const To
|
|||
if (!tok1)
|
||||
return;
|
||||
|
||||
int count = 0;
|
||||
std::string path;
|
||||
unsigned int path_length = 0;
|
||||
|
||||
// back up to head of path
|
||||
while (tok1 && tok1->previous() && tok1->previous()->str() == "::" &&
|
||||
tok1->tokAt(-2) && tok1->tokAt(-2)->isName()) {
|
||||
|
|
Loading…
Reference in New Issue