[React Native] Fix whitespace

This commit is contained in:
Alex Akers 2015-07-07 12:14:13 -07:00
parent 3c541ca540
commit c928d9495b

View File

@ -177,12 +177,9 @@ void RCTSwapClassMethods(Class cls, SEL original, SEL replacement)
IMP replacementImplementation = method_getImplementation(replacementMethod);
const char *replacementArgTypes = method_getTypeEncoding(replacementMethod);
if (class_addMethod(cls, original, replacementImplementation, replacementArgTypes))
{
if (class_addMethod(cls, original, replacementImplementation, replacementArgTypes)) {
class_replaceMethod(cls, replacement, originalImplementation, originalArgTypes);
}
else
{
} else {
method_exchangeImplementations(originalMethod, replacementMethod);
}
}
@ -197,12 +194,9 @@ void RCTSwapInstanceMethods(Class cls, SEL original, SEL replacement)
IMP replacementImplementation = method_getImplementation(replacementMethod);
const char *replacementArgTypes = method_getTypeEncoding(replacementMethod);
if (class_addMethod(cls, original, replacementImplementation, replacementArgTypes))
{
if (class_addMethod(cls, original, replacementImplementation, replacementArgTypes)) {
class_replaceMethod(cls, replacement, originalImplementation, originalArgTypes);
}
else
{
} else {
method_exchangeImplementations(originalMethod, replacementMethod);
}
}
@ -216,10 +210,8 @@ BOOL RCTClassOverridesInstanceMethod(Class cls, SEL selector)
{
unsigned int numberOfMethods;
Method *methods = class_copyMethodList(cls, &numberOfMethods);
for (unsigned int i = 0; i < numberOfMethods; i++)
{
if (method_getName(methods[i]) == selector)
{
for (unsigned int i = 0; i < numberOfMethods; i++) {
if (method_getName(methods[i]) == selector) {
free(methods);
return YES;
}