From 5bd498c56d226448b69baee07fab7c64b60f9471 Mon Sep 17 00:00:00 2001 From: Richard Kimberly Heck Date: Fri, 6 Nov 2020 11:23:52 -0500 Subject: [PATCH] Move trivial constructors into header. Remove unimplemented one. --- src/ParIterator.cpp | 24 ------------------------ src/ParIterator.h | 18 ++++++++++-------- 2 files changed, 10 insertions(+), 32 deletions(-) diff --git a/src/ParIterator.cpp b/src/ParIterator.cpp index 0464839adb..8086d2fc36 100644 --- a/src/ParIterator.cpp +++ b/src/ParIterator.cpp @@ -26,15 +26,6 @@ namespace lyx { // ////////////////////////////////////////////////////////////////////////// -ParIterator::ParIterator(DocIterator const & dit) - : DocIterator(dit) -{} - - -ParIterator::ParIterator(ParIterator const & pi) - : DocIterator(DocIterator(pi)) -{} - ParIterator par_iterator_begin(Inset & inset) { @@ -113,21 +104,6 @@ ParagraphList & ParIterator::plist() const ////////////////////////////////////////////////////////////////////////// -ParConstIterator::ParConstIterator(Buffer const * buf) - : DocIterator(const_cast(buf)) -{} - - -ParConstIterator::ParConstIterator(DocIterator const & dit) - : DocIterator(dit) -{} - - -ParConstIterator::ParConstIterator(ParConstIterator const & pi) - : DocIterator(DocIterator(pi)) -{} - - void ParConstIterator::push_back(Inset const & inset) { DocIterator::push_back(CursorSlice(const_cast(inset))); diff --git a/src/ParIterator.h b/src/ParIterator.h index 288b0353fe..f1e2752009 100644 --- a/src/ParIterator.h +++ b/src/ParIterator.h @@ -39,13 +39,12 @@ public: /// /// ParIterator(Buffer * buf) : DocIterator(buf) {} - /// - ParIterator(Buffer * buf, Inset &, pit_type pit); + ParIterator(ParIterator const & pi) : + DocIterator(DocIterator(pi)) {} /// - ParIterator(ParIterator const &); - /// - explicit ParIterator(DocIterator const &); + explicit ParIterator(DocIterator const & dit) : + DocIterator(dit) {} /// This really should be implemented... //ParIterator & operator=(ParIterator const &); @@ -94,11 +93,14 @@ class ParConstIterator : public std::iterator(buf)) {} /// - ParConstIterator(ParConstIterator const &); + ParConstIterator(ParConstIterator const & pi) + : DocIterator(DocIterator(pi)) {} /// - explicit ParConstIterator(DocIterator const &); + explicit ParConstIterator(DocIterator const & dit) + : DocIterator(dit) {} /// void push_back(Inset const &);