private PropListItem ensureProperty(int propType) { PropListItem item = lookupProperty (propType); if (item == null) { item = new PropListItem (); item.Type = propType; item.next = propListHead; propListHead = item; } return item; }
public void removeProp(int propType) { PropListItem x = propListHead; if (x != null) { PropListItem prev = null; while (x.Type != propType) { prev = x; x = x.next; if (x == null) { return; } } if (prev == null) { propListHead = x.next; } else { prev.next = x.next; } } }