Skip to content

Commit

Permalink
Support pre-CXX11 compilers
Browse files Browse the repository at this point in the history
I'll update the toolchain one day, I promise!
  • Loading branch information
m-kuhn committed Aug 31, 2016
1 parent bd3cf76 commit d5377db
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 3 additions & 2 deletions CMakeLists.txt
Expand Up @@ -391,13 +391,14 @@ ELSE()
ENDIF()

#allow override keyword if available
IF (NOT USE_CXX_11)
IF(NOT USE_CXX_11)
ADD_DEFINITIONS("-Doverride=")
ADD_DEFINITIONS("-Dnoexcept=")
ADD_DEFINITIONS("-Dnullptr=0")
ELSE()
ADD_DEFINITIONS("-DHAS_MOVE_SEMANTICS")
ENDIF()


#############################################################
# enable warnings

Expand Down
2 changes: 2 additions & 0 deletions src/core/qgsexpressioncontext.cpp
Expand Up @@ -217,6 +217,7 @@ QgsExpressionContext::QgsExpressionContext( const QgsExpressionContext& other )
mCachedValues = other.mCachedValues;
}

#ifdef HAS_MOVE_SEMANTICS
QgsExpressionContext& QgsExpressionContext::operator=( QgsExpressionContext && other )
{
if ( this != &other )
Expand All @@ -231,6 +232,7 @@ QgsExpressionContext& QgsExpressionContext::operator=( QgsExpressionContext && o
}
return *this;
}
#endif

QgsExpressionContext& QgsExpressionContext::operator=( const QgsExpressionContext & other )
{
Expand Down
2 changes: 2 additions & 0 deletions src/core/qgsexpressioncontext.h
Expand Up @@ -259,7 +259,9 @@ class CORE_EXPORT QgsExpressionContext

QgsExpressionContext& operator=( const QgsExpressionContext& other );

#ifdef HAS_MOVE_SEMANTICS
QgsExpressionContext& operator=( QgsExpressionContext && other );
#endif

~QgsExpressionContext();

Expand Down

0 comments on commit d5377db

Please sign in to comment.