Fix cppcheck initialization warnings

This commit is contained in:
Georg Baum 2016-06-06 21:55:39 +02:00
parent 03395b7871
commit 41fda35c59
6 changed files with 9 additions and 10 deletions

View File

@ -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();
}

View File

@ -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;
}

View File

@ -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)

View File

@ -23,7 +23,6 @@ namespace lyx {
PrinterParams::PrinterParams()
{
target = PRINTER;
file_name = std::string();
all_pages = true;
from_page = 1;
to_page = 0;

View File

@ -47,6 +47,8 @@ public:
NO_DICTIONARY
};
SpellChecker() : change_number_(0) {}
virtual ~SpellChecker() {}
/// does the spell check failed

View File

@ -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)