Coding style.

This commit is contained in:
Jonathan Schleifer 2013-03-31 12:23:39 +02:00
parent 2889711e69
commit 603d3bad7a
6 changed files with 24 additions and 13 deletions

View file

@ -37,6 +37,7 @@
XMPPConnection *_connection; XMPPConnection *_connection;
OFString *_capsNode; OFString *_capsNode;
} }
#ifdef OF_HAVE_PROPERTIES #ifdef OF_HAVE_PROPERTIES
/** /**
* \brief The XMPPDiscoNodes this entity provides Services Discovery * \brief The XMPPDiscoNodes this entity provides Services Discovery

View file

@ -37,6 +37,7 @@
OFSortedList *_features; OFSortedList *_features;
OFMutableDictionary *_childNodes; OFMutableDictionary *_childNodes;
} }
#ifdef OF_HAVE_PROPERTIES #ifdef OF_HAVE_PROPERTIES
/// \brief The JID this node lives on /// \brief The JID this node lives on
@property (readonly) XMPPJID *JID; @property (readonly) XMPPJID *JID;

View file

@ -30,7 +30,7 @@
@interface XMPPMulticastDelegate: OFObject @interface XMPPMulticastDelegate: OFObject
{ {
OFDataArray *_delegates; OFDataArray *_delegates;
size_t handlerIndex; size_t _handlerIndex;
} }
/** /**

View file

@ -65,8 +65,10 @@
continue; continue;
[_delegates removeItemAtIndex: i]; [_delegates removeItemAtIndex: i];
if (i <= handlerIndex)
handlerIndex--; if (i <= _handlerIndex)
_handlerIndex--;
return; return;
} }
} }
@ -78,8 +80,9 @@
id *items = [_delegates items]; id *items = [_delegates items];
BOOL handled = NO; BOOL handled = NO;
for (handlerIndex = 0; handlerIndex < count; handlerIndex++) { for (_handlerIndex = 0; _handlerIndex < count; _handlerIndex++) {
id responder = items[handlerIndex]; id responder = items[_handlerIndex];
if (![responder respondsToSelector: selector]) if (![responder respondsToSelector: selector])
continue; continue;
@ -87,8 +90,11 @@
[responder methodForSelector: selector]; [responder methodForSelector: selector];
handled |= imp(responder, selector, object); handled |= imp(responder, selector, object);
// Update count and items, since the handler might have
// changed them. /*
* Update count and items, since the handler might have changed
* them.
*/
count = [_delegates count]; count = [_delegates count];
items = [_delegates items]; items = [_delegates items];
} }
@ -104,8 +110,9 @@
id *items = [_delegates items]; id *items = [_delegates items];
BOOL handled = NO; BOOL handled = NO;
for (handlerIndex = 0; handlerIndex < count; handlerIndex++) { for (_handlerIndex = 0; _handlerIndex < count; _handlerIndex++) {
id responder = items[handlerIndex]; id responder = items[_handlerIndex];
if (![responder respondsToSelector: selector]) if (![responder respondsToSelector: selector])
continue; continue;
@ -113,8 +120,11 @@
[responder methodForSelector: selector]; [responder methodForSelector: selector];
handled |= imp(responder, selector, object1, object2); handled |= imp(responder, selector, object1, object2);
// Update count and items, since the handler might have
// changed them. /*
* Update count and items, since the handler might have changed
* them.
*/
count = [_delegates count]; count = [_delegates count];
items = [_delegates items]; items = [_delegates items];
} }

View file

@ -155,7 +155,6 @@ OF_APPLICATION_DELEGATE(AppDelegate)
of_log(@"Supports SM: %@", of_log(@"Supports SM: %@",
[conn_ supportsStreamManagement] ? @"YES" : @"NO"); [conn_ supportsStreamManagement] ? @"YES" : @"NO");
XMPPDiscoEntity *discoEntity = XMPPDiscoEntity *discoEntity =
[[XMPPDiscoEntity alloc] initWithConnection: conn]; [[XMPPDiscoEntity alloc] initWithConnection: conn];