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

sizeof(TileTypeBitMask) == 32
This commit is contained in:
Darryl L. Miles 2025-02-17 09:55:50 +00:00 committed by Tim Edwards
parent cfd71f1b5d
commit 86bb97948f
4 changed files with 12 additions and 11 deletions

View File

@ -189,12 +189,12 @@ plowProcessJog(edge, area)
* it returns 1 and aborts. We must therefore iterate until no more
* jogs are eliminated.
*/
while (plowSrShadowBack(edge->e_pNum, &r, DBSpaceBits,
while (plowSrShadowBack(edge->e_pNum, &r, &DBSpaceBits,
plowProcessJogFunc, (ClientData) area))
/* Nothing */;
/* Scan to next edge between space and material */
(void) plowSrShadowBack(edge->e_pNum, &r, DBAllButSpaceBits,
(void) plowSrShadowBack(edge->e_pNum, &r, &DBAllButSpaceBits,
plowJogPropagateLeft, (ClientData) NULL);
}
@ -372,7 +372,7 @@ plowProcessJogFunc(edge, area)
ret = 0;
plowJogEraseList = (LinkedRect *) NULL;
if (plowSrShadowBack(newedge.e_pNum, &r, mask,
if (plowSrShadowBack(newedge.e_pNum, &r, &mask,
plowJogDragLHS, INT2CD(newedge.e_newx - width)) == 0)
{
/* Success: first paint to extend the RHS of the jog */

View File

@ -512,16 +512,17 @@ plowShadowInitialRHS(tp, s, bottomLeft)
*/
int
plowSrShadowBack(pNum, area, okTypes, proc, cdata)
int pNum; /* Plane from plowYankDef to search */
Rect *area; /* Area to search. Edges coincident with the
plowSrShadowBack(
int pNum, /* Plane from plowYankDef to search */
Rect *area, /* Area to search. Edges coincident with the
* left-hand side of this area are not seen;
* they must lie to the right of area->r_xbot.
*/
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

@ -226,7 +226,7 @@ PlowTest(w, cmd)
saveDef = plowYankDef;
plowYankDef = def;
(void) plowSrShadowBack(PL_TECHDEPBASE, &editArea,
okTypes, plowShowShadow, (ClientData) def);
&okTypes, plowShowShadow, (ClientData) def);
plowYankDef = saveDef;
break;
case PC_SHADOW:

View File

@ -265,7 +265,7 @@ extern void plowQueueInit();
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();
extern int plowSrShadowBack(int pNum, Rect *area, const TileTypeBitMask *okTypesp, int (*proc)(), ClientData cdata);
extern int plowSrShadowInitial();
extern bool plowYankMore();
extern void PlowRandomTest();