From 47778971ee6734daafa0bec5e33339e7bc9facea Mon Sep 17 00:00:00 2001 From: "R. Timothy Edwards" Date: Thu, 30 Oct 2025 13:18:12 -0400 Subject: [PATCH] And one more fix to the method, for which I added a variation of DBNMSrPaintPlane() where if "tile" is non-NULL then "plane" can be NULL; the hint tile does not get set but the routine can be called without knowing the plane other than that the tile is in it somewhere. --- database/DBtiles.c | 4 ++-- drc/DRCbasic.c | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/database/DBtiles.c b/database/DBtiles.c index 4d4662a5..14b5135b 100644 --- a/database/DBtiles.c +++ b/database/DBtiles.c @@ -92,7 +92,7 @@ DBSrPaintNMArea(hintTile, plane, ttype, rect, mask, func, arg) * provide a hint tile in case hintTile == NULL. * The hint tile in the plane is updated to be * the last tile visited in the area - * enumeration. + * enumeration, if plane is non-NULL. */ TileType ttype; /* Information about the non-manhattan area to * search; zero if area is manhattan. @@ -129,7 +129,7 @@ DBSrPaintNMArea(hintTile, plane, ttype, rect, mask, func, arg) { /* Each iteration enumerates another tile */ nm_enum: - PlaneSetHint(plane, tp); + if (plane != (Plane *)NULL) PlaneSetHint(plane, tp); if (SigInterruptPending) return (1); diff --git a/drc/DRCbasic.c b/drc/DRCbasic.c index 71c3860f..5ae98496 100644 --- a/drc/DRCbasic.c +++ b/drc/DRCbasic.c @@ -375,9 +375,7 @@ areaNMCheck(tile, arg) TTMaskSetOnlyType(&mask, TiGetLeftType(tile)); TTMaskSetType(&mask, TiGetRightType(tile)); - if (DBSrPaintNMArea((Tile *)tile, - arg->dCD_celldef->cd_planes[arg->dCD_plane], - dinfo, arg->dCD_rlist, + if (DBSrPaintNMArea((Tile *)tile, (Plane *)NULL, dinfo, arg->dCD_rlist, &mask, areaNMReject, (ClientData)tile) == 0) return 0; }