From 030c3a6197da663e5d2df48b9130ef71ee22e86c Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 2 Feb 2015 18:52:24 +0100 Subject: remove pointless return value from QMakeParser::read() it always returned true nowadays. an obvious followup effect is that the return value of parsedProBlock() doesn't need to be null-checked any more as well. Change-Id: I782785cab9b721a78a342a010921a73e642ebe7f Reviewed-by: Joerg Bornemann --- qmake/library/qmakeevaluator.cpp | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) (limited to 'qmake/library/qmakeevaluator.cpp') diff --git a/qmake/library/qmakeevaluator.cpp b/qmake/library/qmakeevaluator.cpp index 68304c2030..b6b8ad1c15 100644 --- a/qmake/library/qmakeevaluator.cpp +++ b/qmake/library/qmakeevaluator.cpp @@ -1303,14 +1303,13 @@ void QMakeEvaluator::setupProject() void QMakeEvaluator::evaluateCommand(const QString &cmds, const QString &where) { if (!cmds.isEmpty()) { - if (ProFile *pro = m_parser->parsedProBlock(cmds, where, -1)) { - if (pro->isOk()) { - m_locationStack.push(m_current); - visitProBlock(pro, pro->tokPtr()); - m_current = m_locationStack.pop(); - } - pro->deref(); + ProFile *pro = m_parser->parsedProBlock(cmds, where, -1); + if (pro->isOk()) { + m_locationStack.push(m_current); + visitProBlock(pro, pro->tokPtr()); + m_current = m_locationStack.pop(); } + pro->deref(); } } @@ -1790,14 +1789,12 @@ bool QMakeEvaluator::evaluateConditional(const QString &cond, const QString &whe { bool ret = false; ProFile *pro = m_parser->parsedProBlock(cond, where, line, QMakeParser::TestGrammar); - if (pro) { - if (pro->isOk()) { - m_locationStack.push(m_current); - ret = visitProBlock(pro, pro->tokPtr()) == ReturnTrue; - m_current = m_locationStack.pop(); - } - pro->deref(); + if (pro->isOk()) { + m_locationStack.push(m_current); + ret = visitProBlock(pro, pro->tokPtr()) == ReturnTrue; + m_current = m_locationStack.pop(); } + pro->deref(); return ret; } -- cgit v1.2.3