Cleanup of ivars

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/branches/nsxml_using_libxml2@34514 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2012-01-13 19:44:55 +00:00
parent f7aff866ac
commit 3fd92857a4
4 changed files with 67 additions and 69 deletions

View file

@ -208,17 +208,7 @@ GS_PRIVATE_INTERNAL(NSXMLDocument)
- (void) setRootElement: (NSXMLNode*)root
{
/*
NSArray *children;
NSAssert(root == nil, NSInvalidArgumentException);
// this method replaces *all* children with the specified element.
children = [[NSArray alloc] initWithObjects: &root count: 1];
[self setChildren: children];
[children release];
internal->rootElement = (NSXMLElement*)root;
*/
#warning properly dispose of old root element.
xmlNodePtr newrootnode;
NSAssert(root != nil, NSInvalidArgumentException);
// Set
@ -258,7 +248,7 @@ GS_PRIVATE_INTERNAL(NSXMLDocument)
NSXMLNodeKind kind;
NSAssert(nil != child, NSInvalidArgumentException);
NSAssert(index <= internal->childCount, NSInvalidArgumentException);
NSAssert(index <= [self childCount], NSInvalidArgumentException);
NSAssert(nil == [child parent], NSInvalidArgumentException);
kind = [child kind];
NSAssert(NSXMLAttributeKind != kind, NSInvalidArgumentException);