Commit d0bc069e authored by Oswald Buddenhagen's avatar Oswald Buddenhagen
Browse files

remove unnecessary parameter from evaluateFileInto()



all callers use the same value, so just inline it in the function.

Change-Id: Icc3f1301ec332cb18f5011b8abfb20703e94a491
Reviewed-by: default avatarDaniel Teske <daniel.teske@nokia.com>
parent 0ad234b6
......@@ -692,7 +692,7 @@ ProStringList QMakeEvaluator::evaluateExpandFunction(
ProValueMap vars;
QString fn = resolvePath(m_option->expandEnvVars(args.at(0).toQString(m_tmp1)));
fn.detach();
if (evaluateFileInto(fn, QMakeHandler::EvalAuxFile, &vars, LoadProOnly))
if (evaluateFileInto(fn, &vars, LoadProOnly))
ret = vars.value(map(args.at(1)));
}
break;
......@@ -1134,7 +1134,7 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateConditionalFunction(
ProValueMap vars;
QString fn = resolvePath(m_option->expandEnvVars(args.at(0).toQString(m_tmp1)));
fn.detach();
if (!evaluateFileInto(fn, QMakeHandler::EvalAuxFile, &vars, LoadProOnly))
if (!evaluateFileInto(fn, &vars, LoadProOnly))
return ReturnFalse;
if (args.count() == 2)
return returnBool(vars.contains(map(args.at(1))));
......@@ -1363,7 +1363,7 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateConditionalFunction(
ok = evaluateFile(fn, QMakeHandler::EvalIncludeFile, LoadProOnly | flags);
} else {
ProValueMap symbols;
if ((ok = evaluateFileInto(fn, QMakeHandler::EvalAuxFile, &symbols, LoadAll | flags))) {
if ((ok = evaluateFileInto(fn, &symbols, LoadAll | flags))) {
ProValueMap newMap;
for (ProValueMap::ConstIterator
it = m_valuemapStack.top().constBegin(),
......
......@@ -1768,14 +1768,13 @@ bool QMakeEvaluator::evaluateFeatureFile(const QString &fileName, bool silent)
return ok;
}
bool QMakeEvaluator::evaluateFileInto(const QString &fileName, QMakeHandler::EvalFileType type,
ProValueMap *values, LoadFlags flags)
bool QMakeEvaluator::evaluateFileInto(const QString &fileName, ProValueMap *values, LoadFlags flags)
{
QMakeEvaluator visitor(m_option, m_parser, m_handler);
visitor.m_caller = this;
visitor.m_outputDir = m_outputDir;
visitor.m_featureRoots = m_featureRoots;
if (!visitor.evaluateFile(fileName, type, flags))
if (!visitor.evaluateFile(fileName, QMakeHandler::EvalAuxFile, flags))
return false;
*values = visitor.m_valuemapStack.top();
#ifdef PROEVALUATOR_FULL
......
......@@ -151,7 +151,7 @@ public:
bool evaluateFile(const QString &fileName, QMakeHandler::EvalFileType type,
LoadFlags flags);
bool evaluateFeatureFile(const QString &fileName, bool silent = false);
bool evaluateFileInto(const QString &fileName, QMakeHandler::EvalFileType type,
bool evaluateFileInto(const QString &fileName,
ProValueMap *values, // output-only
LoadFlags flags);
void message(int type, const QString &msg) const;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment