Andreas Delmelle wrote:
On May 29, 2008, at 18:23, Vincent Hennebert wrote:Could anybody explain me what is the purpose of the following piece of code: if (!breakBeforeServed) { try { if (addKnuthElementsForBreakBefore(returnList, context)) { return returnList; } } finally { breakBeforeServed = true; } } that we can find, for instance, in BlockStackingLM.getNextKnuthElements?Can't explain, other than that it seems to be a remnant of some refactoring cycle without subsequential cleanup...Isn’t it equivalent to the following: if (!breakBeforeServed) { breakBeforeServed = true; if (addKnuthElementsForBreakBefore(returnList, context)) { return returnList; } }Indeed, this has the exact same outcome AFAICT. Cheers Andreas
What's the scope of breakBeforeServed? -- Peter B. West <http://cv.pbw.id.au/> Folio <http://defoe.sourceforge.net/folio/>
