change XNode children to a vector.
This means the order of children is preserved. It also means the name of each node isn't duplicated. This was an opportunity for an inconsistent XNode tree. Nodes can now be renamed after being inserted into a tree. Searching for children by name isn't efficient. Use attributes for that.
This commit is contained in:
@@ -147,9 +147,7 @@ bool IniFile::RenameKey(const RString &from, const RString &to)
|
||||
if( pNode == NULL )
|
||||
return false;
|
||||
|
||||
RemoveChild( pNode, false );
|
||||
pNode->SetName( to );
|
||||
AppendChild( pNode );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user