diff options
author | Oswald Buddenhagen <oswald.buddenhagen@digia.com> | 2014-06-16 14:31:30 +0200 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@digia.com> | 2014-06-20 11:47:19 +0200 |
commit | 11161bbfadd0056466fc414ed659d08a4a0fe492 (patch) | |
tree | cdef2c516bcf1877413c9b36f473ad29a76cdc61 /qmake/library/qmakeevaluator.cpp | |
parent | 473ed1c1aa67ceb345b20d13c408ed8bd65a9e41 (diff) |
pass a pointer instead of a reference to initFrom()
msvc thinks that it's impossible to create a null reference (because
some language lawyer said so) and thus complains about our assert that
checks the reference's validity. work around by not dereferencing the
pointers we already have.
Change-Id: Ife2288d4187860105de12fdebc0e671e0159ace3
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Diffstat (limited to 'qmake/library/qmakeevaluator.cpp')
-rw-r--r-- | qmake/library/qmakeevaluator.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/qmake/library/qmakeevaluator.cpp b/qmake/library/qmakeevaluator.cpp index 2ea5ffd45e..8e1296e1e8 100644 --- a/qmake/library/qmakeevaluator.cpp +++ b/qmake/library/qmakeevaluator.cpp @@ -208,17 +208,17 @@ QMakeEvaluator::~QMakeEvaluator() { } -void QMakeEvaluator::initFrom(const QMakeEvaluator &other) +void QMakeEvaluator::initFrom(const QMakeEvaluator *other) { - Q_ASSERT_X(&other, "QMakeEvaluator::visitProFile", "Project not prepared"); - m_functionDefs = other.m_functionDefs; - m_valuemapStack = other.m_valuemapStack; + Q_ASSERT_X(other, "QMakeEvaluator::visitProFile", "Project not prepared"); + m_functionDefs = other->m_functionDefs; + m_valuemapStack = other->m_valuemapStack; m_valuemapInited = true; - m_qmakespec = other.m_qmakespec; - m_qmakespecName = other.m_qmakespecName; - m_mkspecPaths = other.m_mkspecPaths; - m_featureRoots = other.m_featureRoots; - m_dirSep = other.m_dirSep; + m_qmakespec = other->m_qmakespec; + m_qmakespecName = other->m_qmakespecName; + m_mkspecPaths = other->m_mkspecPaths; + m_featureRoots = other->m_featureRoots; + m_dirSep = other->m_dirSep; } //////// Evaluator tools ///////// @@ -1355,7 +1355,7 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::visitProFile( return ReturnFalse; #endif - initFrom(*baseEnv->evaluator); + initFrom(baseEnv->evaluator); } else { if (!m_valuemapInited) loadDefaults(); |