mirror of https://github.com/procxx/kepka.git
Add saner handling for switch cases [sq]
This commit is contained in:
parent
8dfa82c2ba
commit
76c14bb933
|
@ -1458,7 +1458,6 @@ namespace {
|
|||
i = peersData.insert(id, newData);
|
||||
}
|
||||
switch (restriction) {
|
||||
case PeerData::NotLoaded: assert(false); // temp
|
||||
case PeerData::MinimalLoaded: {
|
||||
if (i.value()->loadedStatus == PeerData::NotLoaded) {
|
||||
return nullptr;
|
||||
|
@ -1469,6 +1468,7 @@ namespace {
|
|||
return nullptr;
|
||||
}
|
||||
} break;
|
||||
case PeerData::NotLoaded: break;
|
||||
}
|
||||
return i.value();
|
||||
}
|
||||
|
|
|
@ -146,7 +146,8 @@ T convertScale(T v) {
|
|||
case dbisOneAndQuarter: return qRound(float64(v) * 1.25 - 0.01);
|
||||
case dbisOneAndHalf: return qRound(float64(v) * 1.5 - 0.01);
|
||||
case dbisTwo: return v * 2;
|
||||
case dbisAuto: case dbisOne: case dbisScaleCount: assert(false); // temp
|
||||
case dbisAuto: case dbisOne: return v;
|
||||
case dbisScaleCount: assert(false); // temp
|
||||
}
|
||||
return v;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue