Menu

#4738 Clean up Beaming_pattern::beamify

Duplicate
None
abandoned
Enhancement
2019-07-31
2016-01-11
Urs Liska
No

Clean up Beaming_pattern::beamify

This patch is not intended for merging yet.
But when I started investigating a proper solution to the
beam subdivision issues (and tried to understand the code
in beaming-pattern.cc) I realized that there is quite some
unnecessary code.

The code in this patch should not change any behaviour
as compared to the released version 2.19.35, and I did not
notice any changes in output, neither in my personal test
files nor in the regression tests.

Please compare files and maybe also invented situations whether
this patch introduces any change in output compared to 2.19.35.

The patch contains the following commits (in reverse order):

rename non_flag_dir to flag_dir in beamify

This is semantically more straightforward, and if there had
been any reason to use non_flag_dir it can't be seen anymore.

Don't create flag_directions vector in beamify

After the previous commit we don't need to refer to the "previous"
and "next" stem's flag_direction anymore. Therefore we don't need
that vector at all and can directly use the single call inside
the main loop.

Don't "set flag directions for beam subdivision"

These conditionals never evaluate to true, so they can be removed
entirely. The flag directions have already been prepared through
the looped calls of flag_direction immediately before.

Remove obsolete 'for' loop in Beaming_pattern::beamify

The for loop supposedly handled left and right beamlets of the stems,
but actually it didn't do anything except running identical code
twice.

http://codereview.appspot.com/281330043

Related

Issues: #4739
Issues: #5547

Discussion

  • Urs Liska

    Urs Liska - 2016-01-11
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -11,11 +11,11 @@
     notice any changes in output, neither in my personal test
     files nor in the regression tests.
    
    -Please compare files and maybe also invented situations whehter
    +Please compare files and maybe also invented situations whether
     this patch introduces any change in output compared to 2.19.35.
    
    -
    +The patch contains the following commits (in reverse order):
    
     rename non_flag_dir to flag_dir in beamify
    
    • Needs: -->
     
  • Anonymous

    Anonymous - 2016-01-11
    • Patch: new --> review
     
  • Anonymous

    Anonymous - 2016-01-11

    Passes make, make check and a full make doc.

     
  • Urs Liska

    Urs Liska - 2016-01-12

    Setting this to "needs_work" doesn't mean I've set it aside, quite the contrary. But the patch set uploaded to Rietveld is simply obsolete by now. No use reviewing or even counting it down.

     
  • Urs Liska

    Urs Liska - 2016-01-12
    • Patch: review --> needs_work
     
  • Simon Albrecht

    Simon Albrecht - 2019-07-31
    • status: Started --> Duplicate
    • Patch: needs_work --> abandoned
     
  • Simon Albrecht

    Simon Albrecht - 2019-07-31

    This is superseded by [#5547].

     

    Related

    Issues: #5547