Skip to content

Commit

Permalink
Merge pull request #24035 from Jojo-Schmitz/compiler-warnings
Browse files Browse the repository at this point in the history
Fix MSVC compiler warnings
  • Loading branch information
RomanPudashkin authored Aug 20, 2024
2 parents 02b8780 + f0a584a commit a6e6c7c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 11 deletions.
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

0 comments on commit a6e6c7c

Please sign in to comment.