Fix a few warnings.

This commit is contained in:
Thibaut Cuvelier 2020-09-02 00:00:54 +02:00
parent 632bad62c9
commit 594a4763b7
3 changed files with 4 additions and 4 deletions

View File

@ -3860,8 +3860,8 @@ bool Paragraph::isHardHyphenOrApostrophe(pos_type pos) const
char_type const c = d->text_[pos]; char_type const c = d->text_[pos];
if (c != '-' && c != '\'') if (c != '-' && c != '\'')
return false; return false;
int nextpos = pos + 1; pos_type nextpos = pos + 1;
int prevpos = pos > 0 ? pos - 1 : 0; pos_type prevpos = pos > 0 ? pos - 1 : 0;
if ((nextpos == psize || isSpace(nextpos)) if ((nextpos == psize || isSpace(nextpos))
&& (pos == 0 || isSpace(prevpos))) && (pos == 0 || isSpace(prevpos)))
return false; return false;

View File

@ -172,7 +172,7 @@ int InsetNewline::plaintext(odocstringstream & os,
} }
void InsetNewline::docbook(XMLStream & xs, OutputParams const & runparams) const void InsetNewline::docbook(XMLStream &, OutputParams const &) const
{ {
// New lines are handled by Paragraph::simpleDocBookOnePar. // New lines are handled by Paragraph::simpleDocBookOnePar.
} }

View File

@ -471,7 +471,7 @@ void makeParagraph(
// Plain layouts must be ignored. // Plain layouts must be ignored.
special_case |= buf.params().documentClass().isPlainLayout(par->layout()) && !runparams.docbook_force_pars; special_case |= buf.params().documentClass().isPlainLayout(par->layout()) && !runparams.docbook_force_pars;
// Equations do not deserve their own paragraph (DocBook allows them outside paragraphs). // Equations do not deserve their own paragraph (DocBook allows them outside paragraphs).
special_case |= nInsets == par->size() && std::all_of(par->insetList().begin(), par->insetList().end(), [](InsetList::Element inset) { special_case |= nInsets == (size_t) par->size() && std::all_of(par->insetList().begin(), par->insetList().end(), [](InsetList::Element inset) {
return inset.inset && inset.inset->asInsetMath(); return inset.inset && inset.inset->asInsetMath();
}); });