Silence some clang warnings.

This commit is contained in:
Richard Kimberly Heck 2020-02-17 12:31:24 -05:00
parent fb03f2a5ec
commit 731feb9f18

View File

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