Skip to content

Commit d5377db

Browse files
committed
Support pre-CXX11 compilers
I'll update the toolchain one day, I promise!
1 parent bd3cf76 commit d5377db

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

CMakeLists.txt

+3-2
Original file line numberDiff line numberDiff line change
@@ -391,13 +391,14 @@ ELSE()
391391
ENDIF()
392392

393393
#allow override keyword if available
394-
IF (NOT USE_CXX_11)
394+
IF(NOT USE_CXX_11)
395395
ADD_DEFINITIONS("-Doverride=")
396396
ADD_DEFINITIONS("-Dnoexcept=")
397397
ADD_DEFINITIONS("-Dnullptr=0")
398+
ELSE()
399+
ADD_DEFINITIONS("-DHAS_MOVE_SEMANTICS")
398400
ENDIF()
399401

400-
401402
#############################################################
402403
# enable warnings
403404

src/core/qgsexpressioncontext.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@ QgsExpressionContext::QgsExpressionContext( const QgsExpressionContext& other )
217217
mCachedValues = other.mCachedValues;
218218
}
219219

220+
#ifdef HAS_MOVE_SEMANTICS
220221
QgsExpressionContext& QgsExpressionContext::operator=( QgsExpressionContext && other )
221222
{
222223
if ( this != &other )
@@ -231,6 +232,7 @@ QgsExpressionContext& QgsExpressionContext::operator=( QgsExpressionContext && o
231232
}
232233
return *this;
233234
}
235+
#endif
234236

235237
QgsExpressionContext& QgsExpressionContext::operator=( const QgsExpressionContext & other )
236238
{

src/core/qgsexpressioncontext.h

+2
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,9 @@ class CORE_EXPORT QgsExpressionContext
259259

260260
QgsExpressionContext& operator=( const QgsExpressionContext& other );
261261

262+
#ifdef HAS_MOVE_SEMANTICS
262263
QgsExpressionContext& operator=( QgsExpressionContext && other );
264+
#endif
263265

264266
~QgsExpressionContext();
265267

0 commit comments

Comments
 (0)