[Bprocessor-commit] model/src/net/sourceforge/bprocessor/model Space.java, 1.183, 1.184
Status: Pre-Alpha
Brought to you by:
henryml
From: Michael L. <he...@us...> - 2007-10-16 11:03:15
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv7755/src/net/sourceforge/bprocessor/model Modified Files: Space.java Log Message: Fixed bug in Space.simplify() Index: Space.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Space.java,v retrieving revision 1.183 retrieving revision 1.184 diff -C2 -d -r1.183 -r1.184 *** Space.java 15 Oct 2007 12:41:24 -0000 1.183 --- Space.java 16 Oct 2007 11:02:48 -0000 1.184 *************** *** 2175,2179 **** public boolean check() { { - // Check ownership relation { Iterator iter = getElements().iterator(); --- 2175,2178 ---- *************** *** 2238,2241 **** --- 2237,2249 ---- } } + { + for (Space element : getElements()) { + for (Surface surface : element.getEnvelope()) { + if (surface.getOwner() != this) { + throw new Error("inconsistency in envelope of " + element); + } + } + } + } return true; } *************** *** 2750,2754 **** Collection<Edge> deletion = new LinkedList(); Set<Surface> empties = new HashSet(); - Collection<Surface> affected = new HashSet<Surface>(); for (Edge current : getEdges()) { if (current.from == current.to) { --- 2758,2761 ---- *************** *** 2767,2771 **** } for (Surface current : empties) { ! remove(current); } } --- 2774,2778 ---- } for (Surface current : empties) { ! current.delete(); } } |