]> git.lyx.org Git - features.git/commitdiff
Fix a few warnings.
authorThibaut Cuvelier <tcuvelier@lyx.org>
Tue, 1 Sep 2020 22:00:54 +0000 (00:00 +0200)
committerThibaut Cuvelier <tcuvelier@lyx.org>
Sat, 19 Sep 2020 18:43:40 +0000 (20:43 +0200)
src/Paragraph.cpp
src/insets/InsetNewline.cpp
src/output_docbook.cpp

index 9dea24b1e78192963c763f4aeca846fa24d9b189..a409d20d3e5879699b395810a2b4ffbfe1b6e4b0 100644 (file)
@@ -3860,8 +3860,8 @@ bool Paragraph::isHardHyphenOrApostrophe(pos_type pos) const
        char_type const c = d->text_[pos];
        if (c != '-' && c != '\'')
                return false;
-       int nextpos = pos + 1;
-       int prevpos = pos > 0 ? pos - 1 : 0;
+       pos_type nextpos = pos + 1;
+       pos_type prevpos = pos > 0 ? pos - 1 : 0;
        if ((nextpos == psize || isSpace(nextpos))
                && (pos == 0 || isSpace(prevpos)))
                return false;
index b33cf007685807993bf53e031721cc6607956ead..4c6f17e1d16ec5db1b6cc80a18fa3af9ab0e4713 100644 (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.
 }
index 1f17351d3fc25160e361c17c025d8b9a1e5e331b..087d5a9f67df85e9191e831d9c3d17e7a5d894c8 100644 (file)
@@ -471,7 +471,7 @@ void makeParagraph(
        // Plain layouts must be ignored.
        special_case |= buf.params().documentClass().isPlainLayout(par->layout()) && !runparams.docbook_force_pars;
        // 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();
        });