Menu

#5374 Remove Grob_info::origin_contexts ()

Fixed
Maintainability
2018-07-13
2018-07-07
No

Remove Grob_info::origin_contexts ()

I cannot believe this: this function is obscure both in definition and
usage. Most uses were completely nonsensical, and one use just an
overly complex method of achieving a semi-random goal.

I cannot figure out what the original aim of the respective code
passages was, but whatever it was, seemingly other workarounds took
its place successfully.

Also contains some preparatory commits:

Remove Grob_info::origin_contexts ().size () uses

The size of Grob_info::origin_contexts () was used several times as a flag,
but the function could never return an empty array anyway.

Sanitize Break_align_engraver::create_alignment source

Break_align_engraver went to some contortions to get an engraver from
the same context as the grob it acknowledged. There is no real point
in it not just using the origin engraver for that purpose, however.

http://codereview.appspot.com/342210043

Discussion

  • Anonymous

    Anonymous - 2018-07-07
    • Description has changed:

    Diff:

    
    
    • Needs: -->
    • Patch: new --> review
     
  • Anonymous

    Anonymous - 2018-07-07

    Passes make, make check and full make doc

     
  • Anonymous

    Anonymous - 2018-07-10
    • Patch: review --> countdown
     
  • Anonymous

    Anonymous - 2018-07-10

    Patch on countdown for July 13th

     
  • Anonymous

    Anonymous - 2018-07-13
    • Patch: countdown --> push
     
  • Anonymous

    Anonymous - 2018-07-13

    Patch counted down - please push.

     
  • David Kastrup

    David Kastrup - 2018-07-13
    • labels: --> Fixed_2_21_0
    • status: Started --> Fixed
    • Patch: push -->
    • Type: Enhancement --> Maintainability
     
  • David Kastrup

    David Kastrup - 2018-07-13

    Pushed to staging as
    commit 9e917846562cd9b14cb3d10720519baa0ae7387c
    Author: David Kastrup dak@gnu.org
    Date: Sat Jul 7 17:56:57 2018 +0200

    Issue 5374/3: Remove Grob_info::origin_contexts ()
    

    commit caba23661abcb7da68409247528f69f0c660f906
    Author: David Kastrup dak@gnu.org
    Date: Sat Jul 7 17:48:33 2018 +0200

    Issue 5374/2: Remove Grob_info::origin_contexts ().size () uses
    
    The size of Grob_info::origin_contexts () was used several times as a flag,
    but the function could never return an empty array anyway.
    

    commit bf72155b0b0cf96b47428082ff0900af4619a94f
    Author: David Kastrup dak@gnu.org
    Date: Sat Jul 7 17:44:46 2018 +0200

    Issue 5374/1: Sanitize Break_align_engraver::create_alignment source
    
    Break_align_engraver went to some contortions to get an engraver from
    the same context as the grob it acknowledged.  There is no real point
    in it not just using the origin engraver for that purpose, however.