Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(801)

Issue 5561046: Make inherited stream event properties immutable. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 4 months ago by dak
Modified:
12 years, 4 months ago
Reviewers:
CC:
lilypond-devel_gnu.org
Visibility:
Public.

Description

Make inherited stream event properties immutable. Previously, the initialization of stream events from the (mutable) part of music event properties was done by just taking the mutable property list. That had the effect that any changes to the inherited properties were reflected in the originating music event, making a mockery of the mutable/immutable distinction intended to provide copy-on-write semantics. As an example, the conversion of the articulations property to events might or might not already have happened if the music event got reported more than once, like it is done in \repeat unfold. The change had the unexpected side effect of making quoted transposed music fail since the transposition worked exclusively on the mutable property list part. This has been fixed by adding a make_transposable member function to Stream_event that copies affected properties from the immutable to the mutable part before one attempts transposition. The source code has not yet been combed through for instances where stream events have been manually cloned to avoid the bad side effects of the original code. Since I need this in other work, I'll likely push to staging somewhat expeditedly once Patchy has not seen anything wrong with it.

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+31 lines, -7 lines) Patch
M lily/include/stream-event.hh View 1 chunk +2 lines, -1 line 0 comments Download
M lily/music.cc View 1 chunk +1 line, -2 lines 0 comments Download
M lily/quote-iterator.cc View 1 chunk +1 line, -0 lines 0 comments Download
M lily/stream-event.cc View 3 chunks +27 lines, -4 lines 0 comments Download

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b