astyle formatting

This commit is contained in:
Daniel Marjamäki 2009-08-23 17:17:57 +02:00
parent 9da2ecf4f4
commit 522f4c18c8
2 changed files with 62 additions and 17 deletions

View File

@ -475,8 +475,8 @@ static int countParameters(const Token *tok)
const char * CheckMemoryLeakInFunction::call_func(const Token *tok, std::list<const Token *> callstack, const unsigned int varid, AllocType &alloctype, AllocType &dealloctype, bool &all, unsigned int sz)
{
if (bsearch(tok->str().c_str(), call_func_white_list,
sizeof(call_func_white_list) / sizeof(call_func_white_list[0]),
sizeof(call_func_white_list[0]), call_func_white_list_compare))
sizeof(call_func_white_list) / sizeof(call_func_white_list[0]),
sizeof(call_func_white_list[0]), call_func_white_list_compare))
return 0;
if (getAllocationType(tok, varid) != No || getReallocationType(tok, varid) != No || getDeallocationType(tok, varid) != No)

View File

@ -117,9 +117,18 @@ public:
*/
static bool Match(const Token *tok, const char pattern[], unsigned int varid = 0);
bool isName() const { return _isName; }
bool isNumber() const { return _isNumber; }
bool isBoolean() const { return _isBoolean; }
bool isName() const
{
return _isName;
}
bool isNumber() const
{
return _isNumber;
}
bool isBoolean() const
{
return _isBoolean;
}
bool isStandardType() const;
static const Token *findmatch(const Token *tok, const char pattern[], unsigned int varId = 0);
@ -139,13 +148,28 @@ public:
*/
static int multiCompare(const char *haystack, const char *needle);
unsigned int linenr() const { return _linenr; }
void linenr(unsigned int linenr) { _linenr = linenr; }
unsigned int linenr() const
{
return _linenr;
}
void linenr(unsigned int linenr)
{
_linenr = linenr;
}
unsigned int fileIndex() const { return _fileIndex; }
void fileIndex(unsigned int fileIndex) { _fileIndex = fileIndex; }
unsigned int fileIndex() const
{
return _fileIndex;
}
void fileIndex(unsigned int fileIndex)
{
_fileIndex = fileIndex;
}
Token *next() const { return _next; }
Token *next() const
{
return _next;
}
/**
@ -164,11 +188,20 @@ public:
*/
void insertToken(const char str[]);
Token *previous() const { return _previous; }
Token *previous() const
{
return _previous;
}
unsigned int varId() const { return _varId; }
void varId(unsigned int id) { _varId = id; }
unsigned int varId() const
{
return _varId;
}
void varId(unsigned int id)
{
_varId = id;
}
/**
* For debugging purposes, prints token and all tokens
@ -202,7 +235,10 @@ public:
* @param link The token where this token should link
* to.
*/
void link(Token *link) { _link = link; }
void link(Token *link)
{
_link = link;
}
/**
* Return token where this token links to.
@ -211,7 +247,10 @@ public:
*
* @return The token where this token links to.
*/
Token *link() const { return _link; }
Token *link() const
{
return _link;
}
/**
* Links two elements against each other.
@ -219,8 +258,14 @@ public:
static void createMutualLinks(Token *begin, Token *end);
private:
void next(Token *next) { _next = next; }
void previous(Token *previous) { _previous = previous; }
void next(Token *next)
{
_next = next;
}
void previous(Token *previous)
{
_previous = previous;
}
/**
* Works almost like strcmp() except returns only 0 or 1 and