From 30a942af0be63f05ad7df54e4cdfd51e13d6e5eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sun, 4 Oct 2015 22:58:00 +0200 Subject: [PATCH] VS: Attempt to fix build problem with VS --- lib/symboldatabase.cpp | 29 ----------------------------- lib/symboldatabase.h | 28 +++++++++++++++++++++++++++- 2 files changed, 27 insertions(+), 30 deletions(-) diff --git a/lib/symboldatabase.cpp b/lib/symboldatabase.cpp index 8d1b998aa..e56ca8a59 100644 --- a/lib/symboldatabase.cpp +++ b/lib/symboldatabase.cpp @@ -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; -} diff --git a/lib/symboldatabase.h b/lib/symboldatabase.h index 119857cae..55909de58 100644 --- a/lib/symboldatabase.h +++ b/lib/symboldatabase.h @@ -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; + } };