Jean-Marc Lasgouttes schrieb:
 * src/lyxtext.h:
* src/BufferView.C: * src/text3.C: * src/text.C: merge methods
acceptChange() and rejectChange() to acceptOrRejectChange() because
they share a lot of tricky code

I think you could have kept acceptChange and rejectChanges as trivial
wrappers around acceptOrRejectChange (since they lead to cleaner code,
and the fact that there is only one question is only technical). And I
suspect it could be possible to further simplify acceptOrRejectChange
by passing the kind of change that should be kept (INSERTED or
DELETED) instead of a boolean (in particular the second if (accept) test).
In other words, you want me to introduce some

 enum AcceptReject { ACCEPT, REJECT }

and pass it as parameter, right?

Personally, I don't think there is a need for wrapper methods because they are called exactly once.

And acceptChanges would be more understandable if named
acceptAllChanges.
What the semantic difference between acceptChanges and acceptAllChanges? If we "All" here, we have to add it everywhere (which means that we can remove it everywhere).

Michael

Reply via email to