Fix use of uninitialized variable (Wsometimes-uninitialized)
This commit is contained in:
parent
71a414b4b0
commit
cc60b3b8d5
|
@ -2917,12 +2917,18 @@ Editor::snap_to_marker (samplepos_t presnap, RoundMode direction)
|
|||
test = after;
|
||||
} else if (after == max_samplepos) {
|
||||
test = before;
|
||||
} else {
|
||||
if ((direction == RoundUpMaybe || direction == RoundUpAlways)) {
|
||||
} else {
|
||||
switch (direction) {
|
||||
case RoundUpAlways:
|
||||
case RoundUpMaybe:
|
||||
test = after;
|
||||
} else if ((direction == RoundDownMaybe || direction == RoundDownAlways)) {
|
||||
break;
|
||||
case RoundDownMaybe:
|
||||
case RoundDownAlways:
|
||||
test = before;
|
||||
} else if (direction == 0) {
|
||||
break;
|
||||
case RoundNearest:
|
||||
default:
|
||||
if ((presnap - before) < (after - presnap)) {
|
||||
test = before;
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue
Block a user