Tokenizer: Refactoring simplifyPlatformTypes()
This commit is contained in:
parent
5e78dae143
commit
908e1b991e
|
@ -5579,17 +5579,14 @@ void Tokenizer::simplifyPlatformTypes()
|
|||
enum { isLongLong, isLong, isInt } type;
|
||||
|
||||
/** @todo This assumes a flat address space. Not true for segmented address space (FAR *). */
|
||||
if (_settings->sizeof_size_t == 8) {
|
||||
if (_settings->sizeof_long == 8)
|
||||
|
||||
if (_settings->sizeof_size_t == _settings->sizeof_long)
|
||||
type = isLong;
|
||||
else
|
||||
else if (_settings->sizeof_size_t == _settings->sizeof_long_long)
|
||||
type = isLongLong;
|
||||
} else if (_settings->sizeof_size_t == 4) {
|
||||
if (_settings->sizeof_long == 4)
|
||||
type = isLong;
|
||||
else
|
||||
else if (_settings->sizeof_size_t == _settings->sizeof_int)
|
||||
type = isInt;
|
||||
} else
|
||||
else
|
||||
return;
|
||||
|
||||
for (Token *tok = list.front(); tok; tok = tok->next()) {
|
||||
|
@ -5636,8 +5633,7 @@ void Tokenizer::simplifyPlatformTypes()
|
|||
}
|
||||
}
|
||||
|
||||
if (_settings->isWindowsPlatform()) {
|
||||
std::string platform_type(_settings->platformString());
|
||||
const std::string platform_type(_settings->platformString());
|
||||
|
||||
for (Token *tok = list.front(); tok; tok = tok->next()) {
|
||||
if (tok->tokType() != Token::eType && tok->tokType() != Token::eName)
|
||||
|
@ -5683,7 +5679,6 @@ void Tokenizer::simplifyPlatformTypes()
|
|||
typeToken->isLong(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Tokenizer::simplifyStdType()
|
||||
|
|
Loading…
Reference in New Issue