MathLib::intsuffix: Added support for LLU and LU suffixes.
This commit is contained in:
parent
227b48212e
commit
9b14ab15eb
|
@ -547,11 +547,13 @@ static std::string intsuffix(const std::string & first, const std::string & seco
|
|||
suffix2 = c + suffix2;
|
||||
}
|
||||
|
||||
if (suffix1 == "ULL" || suffix2 == "ULL")
|
||||
if (suffix1 == "ULL" || suffix2 == "ULL"
|
||||
|| suffix1 == "LLU" || suffix2 == "LLU")
|
||||
return "ULL";
|
||||
if (suffix1 == "LL" || suffix2 == "LL")
|
||||
return "LL";
|
||||
if (suffix1 == "UL" || suffix2 == "UL")
|
||||
if (suffix1 == "UL" || suffix2 == "UL"
|
||||
|| suffix1 == "LU" || suffix2 == "LU")
|
||||
return "UL";
|
||||
if (suffix1 == "L" || suffix2 == "L")
|
||||
return "L";
|
||||
|
|
|
@ -2036,7 +2036,7 @@ void Tokenizer::simplifySQL()
|
|||
|
||||
void Tokenizer::simplifyDebugNew()
|
||||
{
|
||||
if (isC())
|
||||
if (isC())
|
||||
return;
|
||||
if (!_settings->isWindowsPlatform())
|
||||
return;
|
||||
|
@ -9694,7 +9694,7 @@ void Tokenizer::simplifyNamespaceStd()
|
|||
// Remove Microsoft MFC 'DECLARE_MESSAGE_MAP()'
|
||||
void Tokenizer::simplifyMicrosoftMFC()
|
||||
{
|
||||
if (isC())
|
||||
if (isC())
|
||||
return;
|
||||
// skip if not Windows
|
||||
if (!_settings->isWindowsPlatform())
|
||||
|
@ -9890,7 +9890,7 @@ void Tokenizer::simplifyBorland()
|
|||
// Remove Qt signals and slots
|
||||
void Tokenizer::simplifyQtSignalsSlots()
|
||||
{
|
||||
if (isC())
|
||||
if (isC())
|
||||
return;
|
||||
for (Token *tok = list.front(); tok; tok = tok->next()) {
|
||||
// check for emit which can be outside of class
|
||||
|
|
|
@ -189,6 +189,13 @@ private:
|
|||
ASSERT_EQUALS("2LL", MathLib::add("1LL", "1UL"));
|
||||
ASSERT_EQUALS("2ULL", MathLib::add("1ULL", "1UL"));
|
||||
|
||||
ASSERT_EQUALS("2UL", MathLib::add("1", "1LU"));
|
||||
ASSERT_EQUALS("2UL", MathLib::add("1U", "1LU"));
|
||||
ASSERT_EQUALS("2UL", MathLib::add("1L", "1LU"));
|
||||
ASSERT_EQUALS("2UL", MathLib::add("1UL", "1LU"));
|
||||
ASSERT_EQUALS("2LL", MathLib::add("1LL", "1LU"));
|
||||
ASSERT_EQUALS("2ULL", MathLib::add("1ULL", "1LU"));
|
||||
|
||||
ASSERT_EQUALS("2LL", MathLib::add("1", "1LL"));
|
||||
ASSERT_EQUALS("2LL", MathLib::add("1U", "1LL"));
|
||||
ASSERT_EQUALS("2LL", MathLib::add("1L", "1LL"));
|
||||
|
@ -202,6 +209,13 @@ private:
|
|||
ASSERT_EQUALS("2ULL", MathLib::add("1UL", "1ULL"));
|
||||
ASSERT_EQUALS("2ULL", MathLib::add("1LL", "1ULL"));
|
||||
ASSERT_EQUALS("2ULL", MathLib::add("1ULL", "1ULL"));
|
||||
|
||||
ASSERT_EQUALS("2ULL", MathLib::add("1", "1LLU"));
|
||||
ASSERT_EQUALS("2ULL", MathLib::add("1U", "1LLU"));
|
||||
ASSERT_EQUALS("2ULL", MathLib::add("1L", "1LLU"));
|
||||
ASSERT_EQUALS("2ULL", MathLib::add("1UL", "1LLU"));
|
||||
ASSERT_EQUALS("2ULL", MathLib::add("1LL", "1LLU"));
|
||||
ASSERT_EQUALS("2ULL", MathLib::add("1ULL", "1LLU"));
|
||||
}
|
||||
|
||||
void convert() const {
|
||||
|
|
Loading…
Reference in New Issue