VS: Attempt to fix build problem with VS

This commit is contained in:
Daniel Marjamäki 2015-10-04 22:58:00 +02:00
parent 399cd0c07b
commit 30a942af0b
2 changed files with 27 additions and 30 deletions

View File

@ -3769,32 +3769,3 @@ void SymbolDatabase::setValueTypeInTokenList(Token *tokens)
}
}
}
std::string ValueType::str() const
{
std::string ret;
if (isIntegral()) {
if (sign == SIGNED)
ret = "signed ";
else if (sign == UNSIGNED)
ret = "unsigned ";
if (type == BOOL)
ret += "bool";
else if (type == CHAR)
ret += "char";
else if (type == SHORT)
ret += "short";
else if (type == INT)
ret += "int";
else if (type == LONG)
ret += "long";
else if (type == LONGLONG)
ret += "long long";
} else if (type == FLOAT)
ret = "float";
else if (type == DOUBLE)
ret = "double";
for (int p = 0; p < pointer; p++)
ret += "*";
return ret;
}

View File

@ -1052,7 +1052,33 @@ public:
return (type >= ValueType::Type::BOOL && type <= ValueType::Type::LONGLONG);
}
std::string str() const;
std::string str() const {
std::string ret;
if (isIntegral()) {
if (sign == SIGNED)
ret = "signed ";
else if (sign == UNSIGNED)
ret = "unsigned ";
if (type == BOOL)
ret += "bool";
else if (type == CHAR)
ret += "char";
else if (type == SHORT)
ret += "short";
else if (type == INT)
ret += "int";
else if (type == LONG)
ret += "long";
else if (type == LONGLONG)
ret += "long long";
} else if (type == FLOAT)
ret = "float";
else if (type == DOUBLE)
ret = "double";
for (int p = 0; p < pointer; p++)
ret += "*";
return ret;
}
};