diff --git a/src/phrase.cpp b/src/phrase.cpp index ef2c143..874137f 100644 --- a/src/phrase.cpp +++ b/src/phrase.cpp @@ -258,11 +258,12 @@ ConditionalPhrase::ConditionalPhrase(const ConditionalPhrase &other) this->data = new PhraseData(other.data); } +#if __cplusplus >= 201103L ConditionalPhrase::ConditionalPhrase(const ConditionalPhrase &&other) { - qDebug() << "************* ctor called:"; - this->data = new PhraseData(other.data); + this->data = std::move(other.data); } +#endif ConditionalPhrase::ConditionalPhrase(const PhraseData *data) { diff --git a/src/phrase.h b/src/phrase.h index 52bc187..5aa782c 100644 --- a/src/phrase.h +++ b/src/phrase.h @@ -160,7 +160,9 @@ public: QSharedPointer rightDataPointer; ConditionalPhrase(); ConditionalPhrase(const ConditionalPhrase &other); +#if __cplusplus >= 201103L ConditionalPhrase(const ConditionalPhrase &&other); +#endif ConditionalPhrase(const PhraseData *data); ConditionalPhrase(AbstractFieldPhrase *, PhraseData::Condition); ConditionalPhrase(AbstractFieldPhrase *, PhraseData::Condition, const QVariant &v);