From 82943faa9f6f51aebb7960cc8eee73dd44c024e4 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Tue, 7 Jun 2022 05:39:12 -0600 Subject: Convert '!!' to cBOOL() I believe the '!!' is somewhat obscure; I for one didn't know about it for years of programming C, and it was buggy in one compiler, which is why cBOOL was created, I believe. And it is graphically dense, and generally harder to read than the cBOOL() construct. This commit dates from before we moved to C99 where we can simply cast to (bool), and cBOOL() has been rewritten to do that. But the vast majority of code uses cBOOL(), and this commit brings the remainder of the core .[ch] files into uniformity. --- pp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pp.c') diff --git a/pp.c b/pp.c index 168b96d4f4..088d04e30a 100644 --- a/pp.c +++ b/pp.c @@ -5118,7 +5118,7 @@ S_do_delete_local(pTHX) const U8 gimme = GIMME_V; const MAGIC *mg; HV *stash; - const bool sliced = !!(PL_op->op_private & OPpSLICE); + const bool sliced = cBOOL(PL_op->op_private & OPpSLICE); SV **unsliced_keysv = sliced ? NULL : sp--; SV * const osv = POPs; SV **mark = sliced ? PL_stack_base + POPMARK : unsliced_keysv-1; -- cgit v1.2.1