plowSrShadowInitial() pass by-pointer const TileTypeBitMask* instead of by-value

sizeof(TileTypeBitMask) == 32
This commit is contained in:
Darryl L. Miles 2025-02-17 09:58:29 +00:00 committed by Tim Edwards
parent 86bb97948f
commit 8ee328811c
3 changed files with 9 additions and 8 deletions

View File

@ -737,7 +737,7 @@ plowPropagateRect(def, userRect, lc, changedArea)
/* Add the initial edges */
for (pNum = PL_TECHDEPBASE; pNum < DBNumPlanes; pNum++)
(void) plowSrShadowInitial(pNum, &plowRect,
lc, plowInitialPaint, INT2CD(plowRect.r_xtop));
&lc, plowInitialPaint, INT2CD(plowRect.r_xtop));
/* Find any subcells crossed by the plow */
(void) DBSrCellPlaneArea(plowYankDef->cd_cellPlane,

View File

@ -357,16 +357,17 @@ plowShadowRHS(tp, s, bottomLeft)
*/
int
plowSrShadowInitial(pNum, area, okTypes, proc, cdata)
int pNum; /* Plane from plowYankDef to search */
Rect *area; /* Area to search. Edges coincident with the
plowSrShadowInitial(
int pNum, /* Plane from plowYankDef to search */
Rect *area, /* Area to search. Edges coincident with the
* right-hand side of this area are not seen;
* they must lie to the left of area->r_xtop.
*/
TileTypeBitMask okTypes;
int (*proc)(); /* Function to apply at each edge */
ClientData cdata; /* Additional argument to pass to (*proc)() */
const TileTypeBitMask *okTypesp,
int (*proc)(), /* Function to apply at each edge */
ClientData cdata) /* Additional argument to pass to (*proc)() */
{
TileTypeBitMask okTypes = *okTypesp; /* TTMaskCopy(&okTypes, okTypesp) */
Plane *plane = plowYankDef->cd_planes[pNum];
struct shadow s;
Tile *tp;

View File

@ -266,7 +266,7 @@ extern int plowSrFinalArea();
extern void plowSrOutline(int pNum, Point *startPoint, const TileTypeBitMask *insideTypesp, int initialDir, int dirMask, int (*proc)(), ClientData cdata);
extern int plowSrShadow(int pNum, Rect *area, const TileTypeBitMask *okTypesp, int (*proc)(), ClientData cdata);
extern int plowSrShadowBack(int pNum, Rect *area, const TileTypeBitMask *okTypesp, int (*proc)(), ClientData cdata);
extern int plowSrShadowInitial();
extern int plowSrShadowInitial(int pNum, Rect *area, const TileTypeBitMask *okTypesp, int (*proc)(), ClientData cdata);
extern bool plowYankMore();
extern void PlowRandomTest();
extern void plowDebugInit();