Skip to content

Commit

Permalink
Replace instances of "if X then return false; else return true; fi;" …
Browse files Browse the repository at this point in the history
…by "return not X;"
  • Loading branch information
james-d-mitchell committed Jan 28, 2024
1 parent cb6457d commit 5954c94
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 20 deletions.
6 changes: 1 addition & 5 deletions lib/grp.gi
Original file line number Diff line number Diff line change
Expand Up @@ -2955,11 +2955,7 @@ local n,a;
fi;

a:=AutomorphismGroup(G);
if ForAny(GeneratorsOfGroup(a),i->Image(i,H)<>H) then
return false;
else
return true;
fi;
return not ForAny(GeneratorsOfGroup(a),i->Image(i,H)<>H);
end );


Expand Down
6 changes: 1 addition & 5 deletions lib/kernel.g
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,7 @@ end;
## </ManSection>
##
IS_SUBSTRING := function( str, sub )
if LEN_LIST(sub) > 0 and POSITION_SUBSTRING(str, sub, 0) = fail then
return false;
else
return true;
fi;
return LEN_LIST(sub) = 0 or POSITION_SUBSTRING(str, sub, 0) <> fail;
end;


Expand Down
6 changes: 1 addition & 5 deletions lib/ratfun1.gi
Original file line number Diff line number Diff line change
Expand Up @@ -635,11 +635,7 @@ local a,b,fam,i, j,ln,ld,rn,rd;
od;
# is there an a-remainder (then a is larger)
# or are both polynomials equal?
if i>0 or i=j then
return false;
else
return true;
fi;
return not (i>0 or i=j);
end );

#############################################################################
Expand Down
6 changes: 1 addition & 5 deletions lib/straight.gi
Original file line number Diff line number Diff line change
Expand Up @@ -526,11 +526,7 @@ InstallMethod( IsInternallyConsistent,

# If the number of generators is stored then check
# that only defined positions are accessed.
if IsBound( nrgens ) and not IsSubset( defined, gens ) then
return false;
else
return true;
fi;
return not ( IsBound( nrgens ) and not IsSubset( defined, gens ) );
end;

len:= Length( lines );
Expand Down

0 comments on commit 5954c94

Please sign in to comment.