From ecf556da7ea56fdba9c321cdaa8ce009abaa2894 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sun, 18 Apr 2010 20:59:48 +0200 Subject: [PATCH] astyle formatting --- lib/checkbufferoverrun.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/checkbufferoverrun.cpp b/lib/checkbufferoverrun.cpp index 21bd2d776..a5f82559c 100644 --- a/lib/checkbufferoverrun.cpp +++ b/lib/checkbufferoverrun.cpp @@ -1267,22 +1267,22 @@ void CheckBufferOverrun::checkSprintfCall(const Token *tok, int size) void CheckBufferOverrun::negativeIndexError(const Token *tok, long index) { - std::ostringstream ostr; - ostr << "Array index " << index << " corresponds with " << (unsigned long)index << ", which is likely out of bounds"; - reportError(tok, Severity::error, "negativeIndex", ostr.str()); + std::ostringstream ostr; + ostr << "Array index " << index << " corresponds with " << (unsigned long)index << ", which is likely out of bounds"; + reportError(tok, Severity::error, "negativeIndex", ostr.str()); } void CheckBufferOverrun::negativeIndex() { - const char pattern[] = "[ %num% ]"; - for (const Token *tok = Token::findmatch(_tokenizer->tokens(), pattern); tok; tok = Token::findmatch(tok->next(),pattern)) - { - const long index = MathLib::toLongNumber(tok->next()->str()); - if (index < 0) - { - negativeIndexError(tok, index); - } - } + const char pattern[] = "[ %num% ]"; + for (const Token *tok = Token::findmatch(_tokenizer->tokens(), pattern); tok; tok = Token::findmatch(tok->next(),pattern)) + { + const long index = MathLib::toLongNumber(tok->next()->str()); + if (index < 0) + { + negativeIndexError(tok, index); + } + } }