From: Richard Kimberly Heck Date: Mon, 17 Feb 2020 17:31:24 +0000 (-0500) Subject: Silence some clang warnings. X-Git-Tag: lyx-2.4.0dev-acb2ca7b~1250 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;ds=sidebyside;h=731feb9f18ed5ad4d54ccedaf95078849784f978;p=features.git Silence some clang warnings. --- diff --git a/src/frontends/qt/TocModel.cpp b/src/frontends/qt/TocModel.cpp index e43b3df445..1974422a8f 100644 --- a/src/frontends/qt/TocModel.cpp +++ b/src/frontends/qt/TocModel.cpp @@ -126,8 +126,8 @@ QModelIndex TocModel::modelIndex(DocIterator const & dit) const if (toc_->empty()) return QModelIndex(); - unsigned int const toc_index = TocBackend::findItem(*toc_, dit) - - toc_->begin(); + unsigned int const toc_index = + static_cast(TocBackend::findItem(*toc_, dit) - toc_->begin()); QModelIndexList list = model()->match(model()->index(0, 0), Qt::UserRole, QVariant(toc_index), 1, @@ -283,7 +283,7 @@ QAbstractItemModel * TocModels::model(QString const & type) if (it != models_.end()) return it.value()->model(); LYXERR0("type not found: " << type); - return 0; + return nullptr; }