Skip to content

Commit

Permalink
fixing yet more warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Jojo-Schmitz committed Feb 16, 2020
1 parent 8538c92 commit 3128dd1
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 17 deletions.
2 changes: 1 addition & 1 deletion fluid/sfont.cpp
Expand Up @@ -784,7 +784,7 @@ bool SFont::load()
}
f.close();
/* sort preset list by bank, preset # */
qSort(presets.begin(), presets.end(), preset_compare);
std::sort(presets.begin(), presets.end(), preset_compare);
return true;
}

Expand Down
10 changes: 5 additions & 5 deletions libmscore/layout.cpp
Expand Up @@ -220,7 +220,7 @@ void Score::layoutChords1(Segment* segment, int staffIdx)

// layout upstem noteheads
if (upVoices > 1) {
qSort(upStemNotes.begin(), upStemNotes.end(),
std::sort(upStemNotes.begin(), upStemNotes.end(),
[](Note* n1, const Note* n2) ->bool {return n1->line() > n2->line(); } );
}
if (upVoices) {
Expand All @@ -230,7 +230,7 @@ void Score::layoutChords1(Segment* segment, int staffIdx)

// layout downstem noteheads
if (downVoices > 1) {
qSort(downStemNotes.begin(), downStemNotes.end(),
std::sort(downStemNotes.begin(), downStemNotes.end(),
[](Note* n1, const Note* n2) ->bool {return n1->line() > n2->line(); } );
}
if (downVoices) {
Expand Down Expand Up @@ -347,7 +347,7 @@ void Score::layoutChords1(Segment* segment, int staffIdx)
else
break;
}
qSort(overlapNotes.begin(), overlapNotes.end(),
std::sort(overlapNotes.begin(), overlapNotes.end(),
[](Note* n1, const Note* n2) ->bool {return n1->line() > n2->line(); } );

// determine nature of overlap
Expand Down Expand Up @@ -565,7 +565,7 @@ void Score::layoutChords1(Segment* segment, int staffIdx)
if (downVoices)
notes.insert(notes.end(), downStemNotes.begin(), downStemNotes.end());
if (upVoices + downVoices > 1)
qSort(notes.begin(), notes.end(),
std::sort(notes.begin(), notes.end(),
[](Note* n1, const Note* n2) ->bool {return n1->line() > n2->line(); } );
layoutChords3(notes, staff, segment);
}
Expand Down Expand Up @@ -1082,7 +1082,7 @@ void Score::layoutChords3(std::vector<Note*>& notes, const Staff* staff, Segment
}
nAcc = umi.size();
if (nAcc > 1)
qSort(umi);
std::sort(umi.begin(), umi.end());

// lay out columns
for (int i = 0; i < nColumns; ++i) {
Expand Down
2 changes: 1 addition & 1 deletion libmscore/mscoreview.cpp
Expand Up @@ -74,7 +74,7 @@ const QList<Element*> MuseScoreView::elementsAt(const QPointF& p)
Page* page = point2page(p);
if (page) {
el = page->items(p - page->pos());
qSort(el.begin(), el.end(), elementLower);
std::sort(el.begin(), el.end(), elementLower);
}
return el;
}
Expand Down
2 changes: 1 addition & 1 deletion libmscore/tuplet.cpp
Expand Up @@ -1018,7 +1018,7 @@ static bool tickGreater(const DurationElement* a, const DurationElement* b)

void Tuplet::sortElements()
{
qSort(_elements.begin(), _elements.end(), tickGreater);
std::sort(_elements.begin(), _elements.end(), tickGreater);
}

//---------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion midi/midifile.cpp
Expand Up @@ -901,7 +901,7 @@ void MidiFile::separateChannel()
int nn = channel.size();
if (nn <= 1)
continue;
qSort(channel);
std::sort(channel.begin(), channel.end());
// -- split --
// insert additional tracks, assign to them found channels
for (int ii = 1; ii < nn; ++ii) {
Expand Down
4 changes: 2 additions & 2 deletions mscore/importmidi/importmidi_chord.cpp
Expand Up @@ -410,7 +410,7 @@ void sortNotesByPitch(std::multimap<ReducedFraction, MidiChord> &chords)
for (auto &chordEvent: chords) {
// in each chord sort notes by pitches
auto &notes = chordEvent.second.notes;
qSort(notes.begin(), notes.end(), pitchSort);
std::sort(notes.begin(), notes.end(), pitchSort);
}
}

Expand All @@ -426,7 +426,7 @@ void sortNotesByLength(std::multimap<ReducedFraction, MidiChord> &chords)
for (auto &chordEvent: chords) {
// in each chord sort notes by lengths
auto &notes = chordEvent.second.notes;
qSort(notes.begin(), notes.end(), lenSort);
std::sort(notes.begin(), notes.end(), lenSort);
}
}

Expand Down
2 changes: 1 addition & 1 deletion mscore/importmidi/importmidi_panel.cpp
Expand Up @@ -143,7 +143,7 @@ void ImportMidiPanel::fillCharsetList()

_ui->comboBoxCharset->clear();
QList<QByteArray> charsets = QTextCodec::availableCodecs();
qSort(charsets.begin(), charsets.end());
std::sort(charsets.begin(), charsets.end());
int idx = 0;
int maxWidth = 0;
for (const auto &charset: charsets) {
Expand Down
1 change: 0 additions & 1 deletion mscore/mixer.cpp
Expand Up @@ -387,7 +387,6 @@ void Mixer::updateTracks()
Instrument* proxyInstr = nullptr;
Channel* proxyChan = nullptr;
if (!il->empty()) {
il->begin();
proxyInstr = il->begin()->second;
proxyChan = proxyInstr->playbackChannel(0, _score->masterScore());
}
Expand Down
2 changes: 1 addition & 1 deletion mscore/musescore.cpp
Expand Up @@ -717,7 +717,7 @@ bool MuseScore::importExtension(QString path)
infoMsgBox->setTextFormat(Qt::RichText);
infoMsgBox->setMinimumSize(300, 100);
infoMsgBox->setMaximumSize(300, 100);
infoMsgBox->setStandardButtons(0);
infoMsgBox->setStandardButtons({});
infoMsgBox->setText(QString("<p align='center'>") + tr("Please wait, unpacking extension…") + QString("</p>"));

//setup async run of long operations
Expand Down
2 changes: 1 addition & 1 deletion mscore/ove.cpp
Expand Up @@ -7634,7 +7634,7 @@ void OveOrganizer::organizeContainers(int /*part*/, int /*track*/,
}

// shift voices
qSort(voices.begin(), voices.end());
std::sort(voices.begin(), voices.end());

for (i = 0; i < voices.size(); ++i) {
int voice = voices[i];
Expand Down
2 changes: 1 addition & 1 deletion mscore/prefsdialog.cpp
Expand Up @@ -528,7 +528,7 @@ void PreferenceDialog::updateValues(bool useDefaultValues)
useImportStyleFile->setChecked(!styleFile.isEmpty());

QList<QByteArray> charsets = QTextCodec::availableCodecs();
qSort(charsets.begin(), charsets.end());
std::sort(charsets.begin(), charsets.end());
int idx = 0;
importCharsetListOve->clear();
importCharsetListGP->clear();
Expand Down
2 changes: 1 addition & 1 deletion mscore/scoreview.cpp
Expand Up @@ -4604,7 +4604,7 @@ QList<Element*> ScoreView::elementsNear(QPointF p)
}
}
if (!ll.empty())
qSort(ll.begin(), ll.end(), elementLower);
std::sort(ll.begin(), ll.end(), elementLower);
return ll;
}

Expand Down

0 comments on commit 3128dd1

Please sign in to comment.