some reformatting

Replace some
  (foo &&
   bar)
that had crept back into the code with
  (foo
   && bar)
to match the reformatting which took place before 3.6.0.  There are a
couple of lines ending in '||' still present but they look intentional.
isaac64.c has some trailing '|' bit operators that could/should be
moved to the start of the next line but I didn't touch that file.

While in the affected files, I tried to shorten most overly wide lines
(the right margin is supposed to at column 78 and there are quite a
few lines which are 79 characters long, but I left most of those
rather than introduce new line splits).  Also replace a handful of
tabs with spaces.  I was a little surprised not find any trailing
spaces (in the dozen or so files being updated).  I didn't look for
trailing arithmetic or '?'/':' operators which aught to be moved to
the start of the next line.
This commit is contained in:
PatR
2021-12-14 07:43:40 -08:00
parent d0197bd3e7
commit 495cda17b7
13 changed files with 212 additions and 141 deletions

View File

@@ -2927,7 +2927,7 @@ inaccessible_equipment(struct obj *obj,
return FALSE;
}
/* not a getobj callback - unifies code among the other four getobj callbacks */
/* not a getobj callback - unifies code among the other 4 getobj callbacks */
static int
equip_ok(struct obj *obj, boolean removing, boolean accessory)
{
@@ -2937,7 +2937,7 @@ equip_ok(struct obj *obj, boolean removing, boolean accessory)
if (!obj)
return GETOBJ_EXCLUDE;
/* ignore for putting on if already worn, or removing if not already worn */
/* ignore for putting on if already worn, or removing if not worn */
is_worn = ((obj->owornmask & (W_ARMOR | W_ACCESSORY)) != 0);
if (removing ^ is_worn)
return GETOBJ_EXCLUDE_INACCESS;
@@ -2956,8 +2956,8 @@ equip_ok(struct obj *obj, boolean removing, boolean accessory)
return GETOBJ_DOWNPLAY;
/* armor we can't wear, e.g. from polyform */
if (obj->oclass == ARMOR_CLASS && !removing &&
!canwearobj(obj, &dummymask, FALSE))
if (obj->oclass == ARMOR_CLASS && !removing
&& !canwearobj(obj, &dummymask, FALSE))
return GETOBJ_DOWNPLAY;
/* Possible extension: downplay items (both accessories and armor) which