Frameworks/Adium Framework/Source/AIXMLElement.m
branchadium-1.5.11
changeset 6016 325e2ab3406f
parent 3568 1cd209516587
equal deleted inserted replaced
6014:fcb71cb71a3d 6016:325e2ab3406f
   139  *
   139  *
   140  * This overrides any currently-set attributes.
   140  * This overrides any currently-set attributes.
   141  */
   141  */
   142 - (void)setAttributeNames:(NSArray *)newAttrNames values:(NSArray *)newAttrVals
   142 - (void)setAttributeNames:(NSArray *)newAttrNames values:(NSArray *)newAttrVals
   143 {
   143 {
   144 	NSAssert2([newAttrNames count] == [newAttrVals count], @"Attribute names and values have different lengths, %ui and %ui respectively", [newAttrNames count], [newAttrVals count]);
   144 	NSAssert2([newAttrNames count] == [newAttrVals count], @"Attribute names and values have different lengths, %lui and %lui respectively", (unsigned long)[newAttrNames count], [newAttrVals count]);
   145 	NSUInteger numberOfDuplicates = [newAttrNames count] - [[NSSet setWithArray:newAttrNames] count];
   145 	NSUInteger numberOfDuplicates = [newAttrNames count] - [[NSSet setWithArray:newAttrNames] count];
   146 	NSAssert1(numberOfDuplicates == 0, @"Duplicate attributes are not allowed; found %ui duplicate(s)",  numberOfDuplicates);
   146     NSAssert1(numberOfDuplicates == 0, @"Duplicate attributes are not allowed; found %lui duplicate(s)", (unsigned long)numberOfDuplicates);
   147 	
   147 	
   148 	[attributeNames setArray:newAttrNames];
   148 	[attributeNames setArray:newAttrNames];
   149 	[attributeValues setArray:newAttrVals];
   149 	[attributeValues setArray:newAttrVals];
   150 }
   150 }
   151 
   151