From 35e5d37931a4548df96d0d49f6bd0138e65e4b5b Mon Sep 17 00:00:00 2001 From: danny Date: Mon, 9 Nov 2009 15:34:19 +0100 Subject: fix and update rating --- lib/Plugins/CCpp.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/lib/Plugins/CCpp.cpp b/lib/Plugins/CCpp.cpp index 6d6edd56..1ab0e641 100644 --- a/lib/Plugins/CCpp.cpp +++ b/lib/Plugins/CCpp.cpp @@ -164,6 +164,8 @@ static LineRating rate_line(const char *line) { #define FOUND(x) (strstr(line, x) != NULL) /* see the "enum LineRating" comments for possible combinations */ + if (FOUND(" at ")) + return Good; const char *function = strstr(line, " in "); if (function) { @@ -171,12 +173,6 @@ static LineRating rate_line(const char *line) { function = NULL; } - else - { - bool source_file = FOUND(" at "); - if (source_file) - return Good; - } } bool library = FOUND(" from "); if (function && library) @@ -193,7 +189,7 @@ static LineRating rate_line(const char *line) /* returns number of "stars" to show */ static int rate_backtrace(const char *backtrace) { - int i, len; + int i, j, len; int multiplier = 0; int rating = 0; int best_possible_rating = 0; @@ -210,6 +206,9 @@ static int rate_backtrace(const char *backtrace) if (backtrace[i] == '#') /* this separates frames from each other */ { std::string s(backtrace + i + 1, len); + for (j=0; j