#2 qove.cpp:8452:possible cut'n'paste error ?‏

v1.0
open
Rui Fan
None
5
2014-04-24
2014-04-23
dcb
No

BUILD/drumstick-0.5.0/library/src/qove.cpp:8452]: (style) Expression is always false because 'else if' condition matches previous condition at line 8372.

} else if( bin == 0x0291 ) {
    type = Harmony_6;

and later

} else if( bin == 0x0291 ) {
    type = Harmony_sus4;    //sus(add9)

Discussion

    • assigned_to: Rui Fan
     
  • Thanks. I agree. this looks suspicious. I would prefer a switch() sentence
    instead this large chain of 'if's. Anyway, I am not familiar with the OVE
    format enough to fix this issue. Assigned to the code author.

    See also:
    https://github.com/musescore/MuseScore/blob/master/mscore/ove.cpp