Skip to content

Commit

Permalink
Update NSXMLElement.m to satisfy older compilers
Browse files Browse the repository at this point in the history
  • Loading branch information
sensetalkdoug authored May 14, 2024
1 parent f5f8f61 commit fdffcbd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Source/NSXMLElement.m
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,8 @@ - (void) setAttributes: (NSArray*)attributes

// Remove all previous attributes
NSArray *currentAttributes = [self attributes];
for (int index = [currentAttributes count]-1; index >= 0; index--)
int index;
for (index = [currentAttributes count]-1; index >= 0; index--)
{
NSXMLNode *attrNode = [currentAttributes objectAtIndex:index];
NSString *name = [attrNode name];
Expand All @@ -389,7 +390,8 @@ - (void) setAttributesWithDictionary: (NSDictionary*)attributes

// Remove all previous attributes
NSArray *currentAttributes = [self attributes];
for (int index = [currentAttributes count]-1; index >= 0; index--)
int index;
for (index = [currentAttributes count]-1; index >= 0; index--)
{
NSXMLNode *attrNode = [currentAttributes objectAtIndex:index];
NSString *name = [attrNode name];
Expand Down

0 comments on commit fdffcbd

Please sign in to comment.