irRoute.c: LayerInTouchingContact() pass by-pointer const TileTypeBitMask* instead of by-value

sizeof(TileTypeBitMask) == 32
This commit is contained in:
Darryl L. Miles 2025-02-17 09:47:16 +00:00 committed by Tim Edwards
parent 90c03738ce
commit 97189f6219
1 changed files with 5 additions and 5 deletions

View File

@ -881,15 +881,15 @@ irSelectedTileFunc(rect, type, c)
*/ */
bool bool
LayerInTouchingContact(rL,touchingTypes) LayerInTouchingContact(
RouteLayer *rL; RouteLayer *rL,
TileTypeBitMask touchingTypes; const TileTypeBitMask *touchingTypes)
{ {
RouteContact *rC; RouteContact *rC;
for(rC=irRouteContacts; rC!=NULL; rC=rC->rc_next) for(rC=irRouteContacts; rC!=NULL; rC=rC->rc_next)
{ {
if(TTMaskHasType(&touchingTypes,rC->rc_routeType.rt_tileType) && if(TTMaskHasType(touchingTypes,rC->rc_routeType.rt_tileType) &&
(rC->rc_rLayer1==rL || rC->rc_rLayer2==rL)) (rC->rc_rLayer1==rL || rC->rc_rLayer2==rL))
return(TRUE); return(TRUE);
} }
@ -1012,7 +1012,7 @@ irChooseEndPtLayers(routeUse,expansionMask,endPt,argLayers,endPtName)
{ {
rL = (RouteLayer *) LIST_FIRST(l); rL = (RouteLayer *) LIST_FIRST(l);
if((TTMaskHasType(&touchingTypes,rL->rl_routeType.rt_tileType) || if((TTMaskHasType(&touchingTypes,rL->rl_routeType.rt_tileType) ||
LayerInTouchingContact(rL,touchingTypes)) && LayerInTouchingContact(rL,&touchingTypes)) &&
!ListContainsP(rL, presentContactLayers)) !ListContainsP(rL, presentContactLayers))
{ {
LIST_ADD(rL,presentLayers); LIST_ADD(rL,presentLayers);