From 19e5fdb087508f574253b07c96bc7e81bd3fbfde Mon Sep 17 00:00:00 2001 From: Slava Semushin Date: Sat, 15 Aug 2009 09:35:54 +0700 Subject: [PATCH] Fixed #588 (Preprocessor: Sort the configurations) http://sourceforge.net/apps/trac/cppcheck/ticket/588 --- src/preprocessor.cpp | 2 ++ src/preprocessor.h | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/preprocessor.cpp b/src/preprocessor.cpp index f19aa80ef..dc8d77392 100644 --- a/src/preprocessor.cpp +++ b/src/preprocessor.cpp @@ -779,6 +779,8 @@ std::list Preprocessor::getcfgs(const std::string &filedata) ++it; } + ret.sort(); + return ret; } diff --git a/src/preprocessor.h b/src/preprocessor.h index 001e1b12d..a42c33ee8 100644 --- a/src/preprocessor.h +++ b/src/preprocessor.h @@ -118,7 +118,8 @@ private: static std::string removeSpaceNearNL(const std::string &str); /** - * Get all possible configurations. By looking at the ifdefs and ifndefs in filedata + * Get all possible configurations sorted in alphabetical order. + * By looking at the ifdefs and ifndefs in filedata */ std::list getcfgs(const std::string &filedata);