From 7440a75bbd4cf3efd00aefb9b54f45aadf25dbf4 Mon Sep 17 00:00:00 2001 From: David Mitchell Date: Sat, 28 May 2011 14:52:41 +0100 Subject: [PATCH] pp_formline: restruture FF_LINEGLOB change if (linebreak) { decl; .... } to decl; if (!linebreak) break; { .... } shouldn't change the meaning of the code but will allow us to remove one level of indentation and begin to reuse that block of code --- pp_ctl.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/pp_ctl.c b/pp_ctl.c index 2817c12..ccd1676 100644 --- a/pp_ctl.c +++ b/pp_ctl.c @@ -889,14 +889,16 @@ PP(pp_formline) { const bool oneline = fpc[-1] == FF_LINESNGL; const char *s = item = SvPV_const(sv, len); + const char *const send = s + len; + STRLEN to_copy = len; + const U8 *source = (const U8 *) s; + U8 *tmp = NULL; + item_is_utf8 = DO_UTF8(sv); itemsize = len; - if (itemsize) { - STRLEN to_copy = itemsize; - const char *const send = s + len; - const U8 *source = (const U8 *) s; - U8 *tmp = NULL; - + if (!itemsize) + break; + { gotsome = TRUE; chophere = s + itemsize; while (s < send) { -- 2.7.4