Kuba,

> I've had a look, and highlightnetlist() has side effects -- it modifies the 
> object
> if mode = 0. I've split it out into two functions: one that draws, and another
> that only has the side effect.
> 
> I declared highlightnet() to be without side effects (takes const object*
> and const objinst* pointers) just to make it obvious that it doesn't change
> anything.

The only modification done with mode = 0 is to free the netlist memory
at the end, which can be moved outside the function.  Call it
freehighlight() or something, and call it only after calls to
highlightnetlist(..., 0) which erase the netlist.

                                                ---Tim

+--------------------------------+-------------------------------------+
| Dr. R. Timothy Edwards (Tim)   | email: [email protected]    |
| Open Circuit Design, Inc.      | web:   http://opencircuitdesign.com |
| 22815 Timber Creek Lane        | phone: (301) 528-5030               |
| Clarksburg, MD 20871-4001      | cell:  (240) 401-0616               |
+--------------------------------+-------------------------------------+
_______________________________________________
Xcircuit-dev mailing list
[email protected]
http://www.opencircuitdesign.com/mailman/listinfo/xcircuit-dev

Reply via email to