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;
OFString *_capsNode;
}
#ifdef OF_HAVE_PROPERTIES
/**
* \brief The XMPPDiscoNodes this entity provides Services Discovery

View file

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

View file

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

View file

@ -65,8 +65,10 @@
continue;
[_delegates removeItemAtIndex: i];
if (i <= handlerIndex)
handlerIndex--;
if (i <= _handlerIndex)
_handlerIndex--;
return;
}
}
@ -78,8 +80,9 @@
id *items = [_delegates items];
BOOL handled = NO;
for (handlerIndex = 0; handlerIndex < count; handlerIndex++) {
id responder = items[handlerIndex];
for (_handlerIndex = 0; _handlerIndex < count; _handlerIndex++) {
id responder = items[_handlerIndex];
if (![responder respondsToSelector: selector])
continue;
@ -87,8 +90,11 @@
[responder methodForSelector: selector];
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];
items = [_delegates items];
}
@ -104,8 +110,9 @@
id *items = [_delegates items];
BOOL handled = NO;
for (handlerIndex = 0; handlerIndex < count; handlerIndex++) {
id responder = items[handlerIndex];
for (_handlerIndex = 0; _handlerIndex < count; _handlerIndex++) {
id responder = items[_handlerIndex];
if (![responder respondsToSelector: selector])
continue;
@ -113,8 +120,11 @@
[responder methodForSelector: selector];
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];
items = [_delegates items];
}

View file

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