]> git.cworth.org Git - scherzo/commit
Fix the broken SCORE_PITCH_NAME macro to work correctly
authorCarl Worth <cworth@cworth.org>
Tue, 17 Sep 2013 20:31:04 +0000 (13:31 -0700)
committerCarl Worth <cworth@cworth.org>
Tue, 17 Sep 2013 20:31:04 +0000 (13:31 -0700)
commit1fe478f5aaa4f8ebff2a3f7771809c3d1aaa5ef4
tree41e55bb747ff230021ccc27e87efe04da7c3042b
parent8d6e370cf8a188f7174a4a66ddf382e0f744dfa0
Fix the broken SCORE_PITCH_NAME macro to work correctly

For no good reason, the score_pitch_name_t enum had previously been
defined with pre-shifted values. That could have worked, but the
SCORE_PITCH_NAME macro was shiftin the masked value down as if the
enum values were not pre-shifted. So SCORE_PITCH_NAME was yielding
unexpected values, (that did not correspond to score_pitch_name_t
enum values).

We fix this by making the enum sane, (with unshifted values), leaving
the shifting in place in SCORE_PIATCH_NAME and tracking the new style
of the enum by adding shifting to the SCORE_PITCH_VALUE macro.

That is, the macro that is changed by this commit reamins working, and
the macro that is left unchaged by this commit is now fixed.
score.h