summaryrefslogtreecommitdiff
path: root/graphics.c
diff options
context:
space:
mode:
authorTim Edwards <tim@opencircuitdesign.com>2014-10-24 12:40:13 -0400
committerTim Edwards <tim@opencircuitdesign.com>2014-10-24 12:40:13 -0400
commitc934fe4c75e6dbbcaa7e6b6f8c04786ec30e1e2c (patch)
treea7f893f2bf0123ec1ac7b68d021d1a9940f43497 /graphics.c
parent73db8a5a7fd23fc92be201981df007fa9924548e (diff)
Implemented some memory savings by tracking the number of layers that
have pins defined, and using that value to restrict the number of layers allocated for the Nodeloc, Nodesav, and Stub arrays. Also some searches are restricted to those layers only, leading to a small amount of speedup (but probably not significant).
Diffstat (limited to 'graphics.c')
-rw-r--r--graphics.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/graphics.c b/graphics.c
index 4eab75d..a1d3f16 100644
--- a/graphics.c
+++ b/graphics.c
@@ -231,7 +231,7 @@ map_obstruction()
// Draw pins as gray squares
XSetForeground(dpy, gc, graypix);
- for (i = 0; i < Num_layers; i++) {
+ for (i = 0; i < Pinlayers; i++) {
for (x = 0; x < NumChannelsX[i]; x++) {
xspc = (x + 1) * spacing - hspc;
for (y = 0; y < NumChannelsY[i]; y++) {