[LyX/master] Fix a few warnings.
Thibaut Cuvelier
tcuvelier at lyx.org
Sat Sep 19 18:18:56 UTC 2020
commit 594a4763b784edeaa96f875673dd3b5b4742ffc7
Author: Thibaut Cuvelier <tcuvelier at lyx.org>
Date: Wed Sep 2 00:00:54 2020 +0200
Fix a few warnings.
---
src/Paragraph.cpp | 4 ++--
src/insets/InsetNewline.cpp | 2 +-
src/output_docbook.cpp | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp
index 9dea24b..a409d20 100644
--- a/src/Paragraph.cpp
+++ b/src/Paragraph.cpp
@@ -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;
diff --git a/src/insets/InsetNewline.cpp b/src/insets/InsetNewline.cpp
index b33cf00..4c6f17e 100644
--- a/src/insets/InsetNewline.cpp
+++ b/src/insets/InsetNewline.cpp
@@ -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.
}
diff --git a/src/output_docbook.cpp b/src/output_docbook.cpp
index 1f17351..087d5a9 100644
--- a/src/output_docbook.cpp
+++ b/src/output_docbook.cpp
@@ -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();
});
More information about the lyx-cvs
mailing list