Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix MSVC compiler warnings #24035

Merged
merged 3 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/engraving/dom/chord.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1551,7 +1551,7 @@ Chord* Chord::next() const

void Chord::resizeLedgerLinesTo(size_t newSize)
{
int ledgerLineCountDiff = newSize - m_ledgerLines.size();
int ledgerLineCountDiff = static_cast<int>(newSize - m_ledgerLines.size());
if (ledgerLineCountDiff > 0) {
for (int i = 0; i < ledgerLineCountDiff; ++i) {
m_ledgerLines.push_back(new LedgerLine(score()->dummy()));
Expand Down
8 changes: 2 additions & 6 deletions src/framework/extensions/devtools/apidumpmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,20 +138,17 @@ static QString makeCleanType(const QString& type)

static QString sigToString(const IApiRegister::Dump::Sig& sig, IApiRegister::Dump::MethodType type, const QString& prefix = QString())
{
QString str;
switch (type) {
case IApiRegister::Dump::MethodType::Property: {
QString str;
if (!prefix.isEmpty()) {
str += prefix + ".";
}
str += sig.name;
str += "";
str += makeCleanType(sig.retType);

return str;
} break;
case IApiRegister::Dump::MethodType::Method: {
QString str;
if (!prefix.isEmpty()) {
str += prefix + ".";
}
Expand All @@ -175,10 +172,9 @@ static QString sigToString(const IApiRegister::Dump::Sig& sig, IApiRegister::Dum
str += "";
str += makeCleanType(sig.retType);
}

return str;
} break;
}
return str;
}

void ApiDumpModel::load()
Expand Down
2 changes: 1 addition & 1 deletion src/framework/global/api/internal/apiregister.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class DumpApiEngine : public IApiEngine

QJSValue newArray(size_t length) override
{
return engine.newArray(length);
return engine.newArray(static_cast<uint>(length));
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,11 @@ void AbstractInvoker::removeCallBack(int type, Asyncable* receiver)

{
std::lock_guard<std::mutex> lock(m_qInvokersMutex);
for (auto it = m_qInvokers.begin(); it != m_qInvokers.end(); ++it) {
QInvoker* qi = *it;
for (auto iter = m_qInvokers.begin(); iter != m_qInvokers.end(); ++iter) {
QInvoker* qi = *iter;
if (qi->call.call == c.call) {
qi->invalidate();
m_qInvokers.erase(it);
m_qInvokers.erase(iter);
break;
}
}
Expand Down