Fix some MSVC warnings

* Implicit conversion of size_t to int
* Comparing bool with operator >

Change-Id: I4bc5bef57bfa0125b1c82953a7a2cfc24066bc8c
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Orgad Shaneh
2021-10-14 22:32:09 +03:00
committed by Orgad Shaneh
parent e1a15b2db5
commit 5365dd531b
5 changed files with 9 additions and 9 deletions

View File

@@ -1329,7 +1329,7 @@ bool rescanExports(const QString &fileName, FindExportedCppTypes &finder,
QList<LanguageUtils::FakeMetaObject::ConstPtr> exported = finder.exportedTypes();
QHash<QString, QString> contextProperties = finder.contextProperties();
if (exported.isEmpty() && contextProperties.isEmpty()) {
hasNewInfo = hasNewInfo || newData.remove(fileName) > 0;
hasNewInfo = hasNewInfo || newData.remove(fileName);
} else {
ModelManagerInterface::CppData &data = newData[fileName];
if (!hasNewInfo && (data.exportedTypes.size() != exported.size()
@@ -1382,7 +1382,7 @@ void ModelManagerInterface::updateCppQmlTypes(
const bool scan = pair.second;
const QString fileName = doc->fileName();
if (!scan) {
hasNewInfo = newData.remove(fileName) > 0 || hasNewInfo;
hasNewInfo = newData.remove(fileName) || hasNewInfo;
const auto savedDocs = newDeclarations.value(fileName);
for (const CPlusPlus::Document::Ptr &savedDoc : savedDocs) {
finder(savedDoc);