Skip to content

Fix, shorten*, and speed up AdjustLineBreaks.

Rika requested to merge runewalsh/source:alb into main

This changes AdjustLineBreaks to use more pointer arithmetics. Which is my whim, but the main thing is that presently, AdjustLineBreaks might just not work, because it attempts to optimize the case of unchanged string by looking only if the length has changed, which does not account for possible changing lone #13 to #10.

This also (questionably) optimizes copying literal parts with Move and scanning the string with a simplified loop condition that generates better code than case #13, #10:.

Edited by Rika

Merge request reports