Skip to content

Commit

Permalink
Fixed some static analysis warnings
Browse files Browse the repository at this point in the history
partial backport of musescore#8762
  • Loading branch information
PatrickNorton authored and Jojo-Schmitz committed Aug 2, 2021
1 parent 740b161 commit ac8394c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion importexport/guitarpro/importgtp-gp6.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2505,8 +2505,8 @@ void GuitarPro6::readGpif(QByteArray* data)
legatos[slur->track()] = 0;
}
else {
delete slur;
legatos[slur->track()] = 0;
delete slur;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion libmscore/scorediff.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ int MscxModeDiff::performShiftDiff(std::vector<TextDiff>& diffs, int index, int

QString MscxModeDiff::getOuterLines(const QString& str, int lines, bool start) {
lines = qAbs(lines);
const int secIdxStart = start ? 0 : (-1 - (lines - 1));
const int secIdxStart = start ? 0 : -lines;
const int secIdxEnd = start ? (lines - 1) : -1;
constexpr auto secFlags = QString::SectionIncludeTrailingSep | QString::SectionSkipEmpty;
return str.section('\n', secIdxStart, secIdxEnd, secFlags);
Expand Down
2 changes: 1 addition & 1 deletion thirdparty/intervaltree/IntervalTree.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class IntervalTree {
center = other.center;
intervals = other.intervals;
if (other.left) {
left = (intervalTree*) malloc(sizeof(intervalTree));
left = new intervalTree();
*left = *other.left;
} else {
left = NULL;
Expand Down

0 comments on commit ac8394c

Please sign in to comment.