From b7cbc9b0c1cc69d716e43ea43ca7555dd06c3c03 Mon Sep 17 00:00:00 2001
From: Erik Verbruggen <erik.verbruggen@nokia.com>
Date: Thu, 28 Jan 2010 17:05:13 +0100
Subject: [PATCH] Removed methods which always returned a constant (false).

---
 src/libs/cplusplus/pp-engine.cpp | 6 +-----
 src/shared/cplusplus/Parser.cpp  | 8 +-------
 2 files changed, 2 insertions(+), 12 deletions(-)

diff --git a/src/libs/cplusplus/pp-engine.cpp b/src/libs/cplusplus/pp-engine.cpp
index b0557baeaa8..04a522824f8 100644
--- a/src/libs/cplusplus/pp-engine.cpp
+++ b/src/libs/cplusplus/pp-engine.cpp
@@ -311,8 +311,7 @@ protected:
             Value rhs = _value;
 
             for (int LA_token_kind = (*_lex)->kind(), LA_precedence = precedence(LA_token_kind);
-                    LA_precedence > operPrecedence && isBinaryOperator(LA_token_kind)
-                        || LA_precedence == operPrecedence && isRightAssoc(LA_token_kind);
+                    LA_precedence > operPrecedence && isBinaryOperator(LA_token_kind);
                     LA_token_kind = (*_lex)->kind(), LA_precedence = precedence(LA_token_kind)) {
                 rhs = process_expression_with_operator_precedence(rhs, LA_precedence);
             }
@@ -425,9 +424,6 @@ private:
         }
     }
 
-    static inline bool isRightAssoc(int /*tokenKind*/)
-    { return false; }
-
 private:
     Client *client;
     Environment *env;
diff --git a/src/shared/cplusplus/Parser.cpp b/src/shared/cplusplus/Parser.cpp
index cc7f0da2112..5e1fc5a8ecf 100644
--- a/src/shared/cplusplus/Parser.cpp
+++ b/src/shared/cplusplus/Parser.cpp
@@ -148,11 +148,6 @@ inline bool isBinaryOperator(int tokenKind)
     }
 }
 
-inline bool isRightAssoc(int /*tokenKind*/)
-{
-    return false;
-}
-
 } // end of anonymous namespace
 
 #ifndef CPLUSPLUS_NO_DEBUG_RULE
@@ -4390,8 +4385,7 @@ void Parser::parseExpressionWithOperatorPrecedence(ExpressionAST *&lhs, int minP
             return;
 
         for (int tokenKindAhead = tok().kind(), precedenceAhead = precedence(tokenKindAhead, _templateArguments);
-                precedenceAhead > operPrecedence && isBinaryOperator(tokenKindAhead)
-                    || precedenceAhead == operPrecedence && isRightAssoc(tokenKindAhead);
+                precedenceAhead > operPrecedence && isBinaryOperator(tokenKindAhead);
                 tokenKindAhead = tok().kind(), precedenceAhead = precedence(tokenKindAhead, _templateArguments)) {
             parseExpressionWithOperatorPrecedence(rhs, precedenceAhead);
         }
-- 
GitLab