From 12b784393781fd93bac127bd582534693288e464 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Fri, 21 Jul 2017 09:17:25 +0200 Subject: [PATCH] astyle formatting [ci skip] --- lib/token.cpp | 10 +++++----- test/testtoken.cpp | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/token.cpp b/lib/token.cpp index eacb14183..fb13e346c 100644 --- a/lib/token.cpp +++ b/lib/token.cpp @@ -1203,12 +1203,12 @@ static std::string stringFromTokenRange(const Token* start, const Token* end) { std::ostringstream ret; if (end) - end = end->next(); + end = end->next(); for (const Token *tok = start; tok && tok != end; tok = tok->next()) { - if (tok->isUnsigned()) - ret << "unsigned "; - if (tok->isLong()) - ret << (tok->isLiteral() ? "L" : "long "); + if (tok->isUnsigned()) + ret << "unsigned "; + if (tok->isLong()) + ret << (tok->isLiteral() ? "L" : "long "); if (tok->originalName().empty()) { ret << tok->str(); } else diff --git a/test/testtoken.cpp b/test/testtoken.cpp index f00114c9e..804c2b2d3 100644 --- a/test/testtoken.cpp +++ b/test/testtoken.cpp @@ -97,7 +97,7 @@ private: TEST_CASE(canFindMatchingBracketsWithTooManyClosing); TEST_CASE(canFindMatchingBracketsWithTooManyOpening); - TEST_CASE(expressionString); + TEST_CASE(expressionString); } void nextprevious() const { @@ -948,15 +948,15 @@ private: ASSERT(t == nullptr); } - void expressionString() { + void expressionString() { givenACodeSampleToTokenize var1("void f() { *((unsigned long long *)x) = 0; }"); const Token *tok1 = Token::findsimplematch(var1.tokens(), "*"); - ASSERT_EQUALS("*((unsigned long long*)x)", tok1->expressionString()); + ASSERT_EQUALS("*((unsigned long long*)x)", tok1->expressionString()); givenACodeSampleToTokenize var2("typedef unsigned long long u64; void f() { *((u64 *)x) = 0; }"); const Token *tok2 = Token::findsimplematch(var2.tokens(), "*"); - ASSERT_EQUALS("*((unsigned long long*)x)", tok2->expressionString()); - } + ASSERT_EQUALS("*((unsigned long long*)x)", tok2->expressionString()); + } }; REGISTER_TEST(TestToken)