Skip to content

Commit

Permalink
head off more coverity /0 defects
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed May 20, 2020
1 parent 5371e90 commit 914db51
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/Etterna/Globals/MinaCalc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2719,14 +2719,16 @@ Calc::WideRangeRollScaler(const vector<NoteInfo>& NoteInfo,
// producing sub 1 values for ??? reasons, but i don't think
// it makes too much difference and i don't want to spend
// more time on it right now
float cv_prop = cv_taps == 0 ? 1
float cv_prop = window_cv_taps == 0 ? 1
: static_cast<float>(window_taps) /
static_cast<float>(window_cv_taps);

// bigger the lower the proportion of single taps to total
// taps i.e. more chords
float chord_prop = static_cast<float>(window_taps) /
static_cast<float>(window_single_taps);
float chord_prop = window_single_taps == 0
? 1
: static_cast<float>(window_taps) /
static_cast<float>(window_single_taps);

// handle anchors, chord filler, empty sections and single
// notes
Expand Down

0 comments on commit 914db51

Please sign in to comment.