Skip to content

Commit d3987f4

Browse files
committed
regen/embed.pl: Combine the common parts of two 'if's
This commit combines two separate 'if' blocks into one big if block with the conditionals in common to the two blocks, and then the two smaller blocks, each with the conditions that apply to it individually. And then everything is reindented to correspond
1 parent 0d14f95 commit d3987f4

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

regen/embed.pl

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -275,20 +275,17 @@ sub generate_proto_h {
275275
}
276276
my $argname = $1;
277277

278-
if ( defined $argname
279-
&& ($nn||$nz)
280-
&& (! $has_mflag || $binarycompat))
281-
{
282-
push @names_of_nn, $argname;
283-
}
278+
if (defined $argname && (! $has_mflag || $binarycompat)) {
279+
if ($nn||$nz) {
280+
push @names_of_nn, $argname;
281+
}
284282

285-
if ( defined $argname
286-
and (! $has_mflag || $binarycompat)
287-
and ! $nocheck
288-
and defined $argtype
289-
and exists $type_asserts{$argtype})
290-
{
291-
push @typed_args, [ $argtype, $argname ];
283+
if ( ! $nocheck
284+
&& defined $argtype
285+
&& exists $type_asserts{$argtype})
286+
{
287+
push @typed_args, [ $argtype, $argname ];
288+
}
292289
}
293290
}
294291
$ret .= join ", ", @$args;

0 commit comments

Comments
 (0)