diff --git a/src/Compare.cpp b/src/Compare.cpp index f5046bd2e1..68570b85b5 100644 --- a/src/Compare.cpp +++ b/src/Compare.cpp @@ -61,10 +61,10 @@ public: : from(from_), to(to_) {} - DocRange(Buffer const * buf) + DocRange(Buffer const * buf) : + from(doc_iterator_begin(buf)), + to(doc_iterator_end(buf)) { - from = doc_iterator_begin(buf); - to = doc_iterator_end(buf); to.backwardPos(); } diff --git a/src/DocIterator.cpp b/src/DocIterator.cpp index 28d23e8d11..57286d9a6c 100644 --- a/src/DocIterator.cpp +++ b/src/DocIterator.cpp @@ -671,9 +671,9 @@ ostream & operator<<(ostream & os, DocIterator const & dit) /////////////////////////////////////////////////////// -StableDocIterator::StableDocIterator(DocIterator const & dit) +StableDocIterator::StableDocIterator(DocIterator const & dit) : + data_(dit.internalData()) { - data_ = dit.internalData(); for (size_t i = 0, n = data_.size(); i != n; ++i) data_[i].inset_ = 0; } diff --git a/src/InsetList.cpp b/src/InsetList.cpp index 56401a4ba6..3d4f7155ff 100644 --- a/src/InsetList.cpp +++ b/src/InsetList.cpp @@ -42,9 +42,8 @@ struct InsetTablePosLess } // namespace anon -InsetList::InsetList(InsetList const & il) +InsetList::InsetList(InsetList const & il) : list_(il.list_) { - list_ = il.list_; List::iterator it = list_.begin(); List::iterator end = list_.end(); for (; it != end; ++it) diff --git a/src/PrinterParams.cpp b/src/PrinterParams.cpp index 5bcdeb9874..9da9c9a891 100644 --- a/src/PrinterParams.cpp +++ b/src/PrinterParams.cpp @@ -23,7 +23,6 @@ namespace lyx { PrinterParams::PrinterParams() { target = PRINTER; - file_name = std::string(); all_pages = true; from_page = 1; to_page = 0; diff --git a/src/SpellChecker.h b/src/SpellChecker.h index 425925ce37..f908ba2b47 100644 --- a/src/SpellChecker.h +++ b/src/SpellChecker.h @@ -47,6 +47,8 @@ public: NO_DICTIONARY }; + SpellChecker() : change_number_(0) {} + virtual ~SpellChecker() {} /// does the spell check failed diff --git a/src/Text.cpp b/src/Text.cpp index c003350781..794605405a 100644 --- a/src/Text.cpp +++ b/src/Text.cpp @@ -187,9 +187,8 @@ Text::Text(InsetText * owner, bool use_default_layout) Text::Text(InsetText * owner, Text const & text) - : owner_(owner) + : owner_(owner), pars_(text.pars_) { - pars_ = text.pars_; ParagraphList::iterator const end = pars_.end(); ParagraphList::iterator it = pars_.begin(); for (; it != end; ++it)