File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -217,6 +217,21 @@ QgsExpressionContext::QgsExpressionContext( const QgsExpressionContext& other )
217
217
mCachedValues = other.mCachedValues ;
218
218
}
219
219
220
+ QgsExpressionContext& QgsExpressionContext::operator =( QgsExpressionContext && other )
221
+ {
222
+ if ( this != &other )
223
+ {
224
+ qDeleteAll ( mStack );
225
+ // move the stack over
226
+ mStack = other.mStack ;
227
+ other.mStack .clear ();
228
+
229
+ mHighlightedVariables = other.mHighlightedVariables ;
230
+ mCachedValues = other.mCachedValues ;
231
+ }
232
+ return *this ;
233
+ }
234
+
220
235
QgsExpressionContext& QgsExpressionContext::operator =( const QgsExpressionContext & other )
221
236
{
222
237
qDeleteAll ( mStack );
Original file line number Diff line number Diff line change @@ -259,6 +259,8 @@ class CORE_EXPORT QgsExpressionContext
259
259
260
260
QgsExpressionContext& operator =( const QgsExpressionContext& other );
261
261
262
+ QgsExpressionContext& operator =( QgsExpressionContext && other );
263
+
262
264
~QgsExpressionContext ();
263
265
264
266
/* * Check whether a variable is specified by any scope within the context.
You can’t perform that action at this time.
1 commit comments
m-kuhn commentedon Aug 29, 2016
Shouldn't that enforce C++11 or be #ifdef'd?
http://stackoverflow.com/a/31010221/2319028