Re: [PATCH] utf8: use skip_iprefix() in same_utf_encoding()
- From
Jeff King <peff@peff.net>
- Date
- Nov 8, 2019, 22:20 UTC
- Message-ID
- <20191108222048.GA18554@sigill.intra.peff.net>
- In-Reply-To
- <b27cc95d-8cb8-db49-c2d1-3eb591624000@web.de>
On Fri, Nov 08, 2019 at 09:25:21PM +0100, René Scharfe wrote:
> Get rid of magic numbers by using skip_iprefix() and skip_prefix() for > parsing the leading "[uU][tT][fF]-?" of both strings instead of checking > with istarts_with() and an explicit comparison.
Yeah, I think the result is much easier to understand. I didn't look closely at it, but the generated asm seems to be slightly shorter, too.
-Peff