diff options
Diffstat (limited to 'lib/kformula')
-rw-r--r-- | lib/kformula/kformulacommand.cpp | 4 | ||||
-rw-r--r-- | lib/kformula/kformulacommand.h | 4 | ||||
-rw-r--r-- | lib/kformula/kformuladefs.h | 2 |
3 files changed, 6 insertions, 4 deletions
diff --git a/lib/kformula/kformulacommand.cpp b/lib/kformula/kformulacommand.cpp index 4aa31161..24ae790f 100644 --- a/lib/kformula/kformulacommand.cpp +++ b/lib/kformula/kformulacommand.cpp @@ -458,8 +458,8 @@ void KFCAddReplacing::unexecute() // ****** Add index command -KFCAddGenericIndex::KFCAddGenericIndex(Container* document, ElementIndexPtr _index) - : KFCAdd(i18n("Add Index"), document), index(_index) +KFCAddGenericIndex::KFCAddGenericIndex(Container* document, ElementIndexPtr &_index) + : KFCAdd(i18n("Add Index"), document), index(std::move(_index)) { addElement(new SequenceElement()); } diff --git a/lib/kformula/kformulacommand.h b/lib/kformula/kformulacommand.h index bc1703be..75a47da3 100644 --- a/lib/kformula/kformulacommand.h +++ b/lib/kformula/kformulacommand.h @@ -435,7 +435,9 @@ class KFCAddGenericIndex : public KFCAdd { public: - KFCAddGenericIndex(Container* document, ElementIndexPtr index); + KFCAddGenericIndex(Container* document, ElementIndexPtr &index); + KFCAddGenericIndex(KFCAddGenericIndex const &) = delete; + KFCAddGenericIndex& operator=(KFCAddGenericIndex const &) = delete; virtual void execute(); diff --git a/lib/kformula/kformuladefs.h b/lib/kformula/kformuladefs.h index d4a3739f..28322608 100644 --- a/lib/kformula/kformuladefs.h +++ b/lib/kformula/kformuladefs.h @@ -276,7 +276,7 @@ public: virtual BasicElement* getElement() = 0; }; -typedef std::auto_ptr<ElementIndex> ElementIndexPtr; +typedef std::unique_ptr<ElementIndex> ElementIndexPtr; enum RequestID { req_addBracket, |