From 7a8b980627c13884f38d7779554d118bc62338ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sun, 3 May 2009 21:23:47 +0200 Subject: [PATCH] templates: extracted the template simplification into a separate function --- src/tokenize.cpp | 6 ++++++ src/tokenize.h | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/src/tokenize.cpp b/src/tokenize.cpp index 2068e172a..2d29f3b75 100644 --- a/src/tokenize.cpp +++ b/src/tokenize.cpp @@ -479,6 +479,12 @@ void Tokenizer::tokenize(std::istream &code, const char FileName[]) simplifyVarDecl(); // Handle templates.. + simplifyTemplates(); +} +//--------------------------------------------------------------------------- + +void Tokenizer::simplifyTemplates() +{ for (Token *tok = _tokens; tok; tok = tok->next()) { if (!Token::simpleMatch(tok, "template <")) diff --git a/src/tokenize.h b/src/tokenize.h index 71e54c738..e85835cc4 100644 --- a/src/tokenize.h +++ b/src/tokenize.h @@ -193,6 +193,11 @@ private: */ void simplifyNamespaces(); + /** + * Simplify templates + */ + void simplifyTemplates(); + void InsertTokens(Token *dest, Token *src, unsigned int n); /**