initialize variables
This commit is contained in:
parent
c2d6a06daf
commit
48f3ea412a
11 changed files with 14 additions and 15 deletions
|
@ -224,7 +224,7 @@ void Aeolus::setValue(int id, double value)
|
|||
|
||||
double Aeolus::value(int idx) const
|
||||
{
|
||||
double v;
|
||||
double v = 0.0;
|
||||
switch (idx) {
|
||||
case A_VOLUME: v = _audiopar[VOLUME]; break;
|
||||
case A_REVSIZE: v = _audiopar[REVSIZE]; break;
|
||||
|
|
|
@ -505,7 +505,7 @@ void ZitaReverb::setNValue(int idx, double value)
|
|||
|
||||
double ZitaReverb::nvalue(int idx) const
|
||||
{
|
||||
double v;
|
||||
double v = 0.0;
|
||||
switch (idx) {
|
||||
case R_DELAY: v = delay(); break;
|
||||
case R_XOVER: v = xover(); break;
|
||||
|
@ -517,7 +517,6 @@ double ZitaReverb::nvalue(int idx) const
|
|||
case R_EQ2FR: v = eq2fr(); break;
|
||||
case R_EQ2GN: v = eq2gn(); break;
|
||||
case R_OPMIX: v = opmix(); break;
|
||||
break;
|
||||
}
|
||||
return v;
|
||||
}
|
||||
|
|
|
@ -1927,8 +1927,8 @@ void Beam::updateGrips(int* grips, int* defaultGrip, QRectF* grip) const
|
|||
int idx = (_direction == Direction::AUTO || _direction == Direction::DOWN) ? 0 : 1;
|
||||
BeamFragment* f = fragments[editFragment];
|
||||
|
||||
Chord* c1;
|
||||
Chord* c2;
|
||||
Chord* c1 = nullptr;
|
||||
Chord* c2 = nullptr;
|
||||
int n = _elements.size();
|
||||
for (int i = 0; i < n; ++i) {
|
||||
if (_elements[i]->type() == ElementType::CHORD) {
|
||||
|
|
|
@ -479,7 +479,7 @@ bool ParsedChord::parse(const QString& s, const ChordList* cl, bool syntaxOnly,
|
|||
int lastLeadingToken;
|
||||
int len = s.size();
|
||||
int i, j;
|
||||
int thirdKey, seventhKey;
|
||||
int thirdKey = 0, seventhKey = 0;
|
||||
bool susChord = false;
|
||||
QList<HDegree> hdl;
|
||||
int key[] = { 0, 0, 2, 4, 5, 7, 9, 11, 0, 2, 4, 5, 7, 9, 11 };
|
||||
|
|
|
@ -1033,7 +1033,7 @@ void Score::cmdFlip()
|
|||
chord = static_cast<Note*>(e)->chord();
|
||||
else if (e->type() == ElementType::STEM)
|
||||
chord = static_cast<Stem*>(e)->chord();
|
||||
else if (e->type() == ElementType::HOOK)
|
||||
else //if (e->type() == ElementType::HOOK) // no other option left
|
||||
chord = static_cast<Hook*>(e)->chord();
|
||||
if (chord->beam())
|
||||
e = chord->beam(); // fall trough
|
||||
|
|
|
@ -538,7 +538,7 @@ QPointF Element::pagePos() const
|
|||
return p;
|
||||
|
||||
if (_flags & ElementFlag::ON_STAFF) {
|
||||
System* system;
|
||||
System* system = nullptr;
|
||||
if (parent()->type() == ElementType::SEGMENT)
|
||||
system = static_cast<Segment*>(parent())->measure()->system();
|
||||
else if (parent()->type() == ElementType::MEASURE) // used in measure number
|
||||
|
@ -573,7 +573,7 @@ QPointF Element::canvasPos() const
|
|||
return p;
|
||||
|
||||
if (_flags & ElementFlag::ON_STAFF) {
|
||||
System* system;
|
||||
System* system = nullptr;
|
||||
if (parent()->type() == ElementType::SEGMENT)
|
||||
system = static_cast<Segment*>(parent())->measure()->system();
|
||||
else if (parent()->type() == ElementType::MEASURE) // used in measure number
|
||||
|
|
|
@ -549,10 +549,10 @@ QByteArray Selection::symbolListMimeData() const
|
|||
|
||||
int topTrack = 1000000;
|
||||
int bottomTrack = 0;
|
||||
Segment* firstSeg;
|
||||
Segment* firstSeg = nullptr;
|
||||
int firstTick = 0x7FFFFFFF;
|
||||
MAPDATA mapData;
|
||||
Segment* seg;
|
||||
Segment* seg = nullptr;
|
||||
int track;
|
||||
std::multimap<qint64, MAPDATA> map;
|
||||
|
||||
|
|
|
@ -3601,7 +3601,7 @@ void GuitarPro6::readMasterBars(GPPartInfo* partInfo)
|
|||
QDomNode voices = clef.nextSibling();
|
||||
QString voicesString = voices.toElement().text();
|
||||
QDomNode xproperties = voices.nextSibling();
|
||||
ClefType clefId;
|
||||
ClefType clefId = ClefType::INVALID;
|
||||
if (!xproperties.isNull())
|
||||
qDebug("Unsupported tag in bars: XProperties");
|
||||
if (!clefString.compare("F4"))
|
||||
|
|
|
@ -337,7 +337,7 @@ void makeDynamicProgrammingStep(std::vector<std::vector<int>> &penalties,
|
|||
? minMaxPitch.minPitch() : minMaxPitch.maxPitch();
|
||||
const int pitchPenalty = findPitchPenaltyForClef(significantPitch, curClef);
|
||||
int minPenalty = std::numeric_limits<int>::max();
|
||||
int minIndex;
|
||||
int minIndex = 0;
|
||||
for (int prevClef = 0; prevClef != 2; ++prevClef) {
|
||||
int penalty = pitchPenalty;
|
||||
if (prevClef != curClef) {
|
||||
|
|
|
@ -217,7 +217,7 @@ void StaffListItem::staffTypeChanged(int idx)
|
|||
int staffTypeIdx = _staffTypeCombo->itemData(idx).toInt();
|
||||
const StaffType* stfType = StaffType::preset(StaffTypes(staffTypeIdx));
|
||||
if (stfType->group() != ClefInfo::staffGroup(_clef._transposingClef)) {
|
||||
ClefType clefType;
|
||||
ClefType clefType = ClefType::INVALID;
|
||||
switch (stfType->group()) {
|
||||
case StaffGroup::STANDARD:
|
||||
clefType = _defaultClef._transposingClef;
|
||||
|
|
2
thirdparty/diff/diff_match_patch.cpp
vendored
2
thirdparty/diff/diff_match_patch.cpp
vendored
|
@ -1449,7 +1449,7 @@ int diff_match_patch::match_bitap(const QString &text, const QString &pattern,
|
|||
|
||||
int bin_min, bin_mid;
|
||||
int bin_max = pattern.length() + text.length();
|
||||
int *rd;
|
||||
int *rd = NULL;
|
||||
int *last_rd = NULL;
|
||||
for (int d = 0; d < pattern.length(); d++) {
|
||||
// Scan for the best match; each iteration allows for one more error.
|
||||
|
|
Loading…
Reference in a new issue