Minor code spacing and formatting bugs.
authorJay Freeman (saurik) <saurik@saurik.com>
Fri, 18 Feb 2011 10:10:16 +0000 (02:10 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Fri, 18 Feb 2011 10:13:54 +0000 (02:13 -0800)
MobileCydia.mm
UICaboodle/RVBook.h
UICaboodle/RVBook.mm
UICaboodle/RVPage.h

index 37df4df96afbc8c44c8846c52b80eabe00d0dcf9..4d8ba4cc71ec15d33e8c2c89953a45eee082ec23 100644 (file)
@@ -307,12 +307,13 @@ static _finline void UpdateExternalStatus(uint64_t newStatus) {
 }
 
 - (int) yieldToPopupAlertAnimated:(BOOL)animated;
+
 @end
 
 @implementation CYAlertView
 
 - (id) initWithTitle:(NSString *)title buttons:(NSArray *)buttons defaultButtonIndex:(int)index {
-    if ((self = [super init])) {
+    if ((self = [super init]) != nil) {
         [self setTitle:title];
         [self setDelegate:self];
         for (NSString *button in buttons) [self addButtonWithTitle:button];
@@ -871,6 +872,7 @@ class Pcre {
 
 + (Address *) addressWithString:(NSString *)string;
 - (Address *) initWithString:(NSString *)string;
+
 @end
 
 @implementation Address
@@ -3052,7 +3054,7 @@ static NSString *Warning_;
     // XXX: actually implement this thing
     _assert(false);
     if (deadSources_)
-           CFRelease(deadSources_);
+        CFRelease(deadSources_);
     [self releasePackages];
     apr_pool_destroy(pool_);
     NSRecycleZone(zone_);
@@ -3689,6 +3691,7 @@ static NSString *Warning_;
 }
 
 - (id) initWithDelegate:(IndirectDelegate *)indirect;
+
 @end
 
 @implementation CydiaObject
@@ -3939,8 +3942,8 @@ static NSString *Warning_;
 
 @implementation CYLoadingIndicator
 
-- (id)initWithFrame:(CGRect)frame {
-    if ((self = [super initWithFrame:frame])) {
+- (id) initWithFrame:(CGRect)frame {
+    if ((self = [super initWithFrame:frame]) != nil) {
         container_ = [[[UIView alloc] init] autorelease];
         [container_ setAutoresizingMask:UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleBottomMargin];
 
@@ -3979,13 +3982,16 @@ static NSString *Warning_;
         [spinner_ setFrame:spinrect];
         [label_ setFrame:textrect];
         [self addSubview:container_];
-    }
+    } return self;
+}
 
-    return self;
+- (UILabel *) label {
+    return label_;
 }
 
-- (UILabel *)label { return label_; }
-- (UIActivityIndicatorView *)activityIndicatorView { return spinner_; }
+- (UIActivityIndicatorView *) activityIndicatorView {
+    return spinner_;
+}
 
 @end
 /* }}} */
@@ -3999,6 +4005,7 @@ static NSString *Warning_;
     UITabBar *tabbar_;
     UINavigationBar *navbar_;
 }
+
 @end
 
 @implementation CYEmulatedLoadingController
@@ -4037,7 +4044,7 @@ static NSString *Warning_;
 }
 
 - (id) initWithDatabase:(Database *)database {
-    if ((self = [super init])) {
+    if ((self = [super init]) != nil) {
         database_ = database;
         [database_ setDelegate:self];
     } return self;
@@ -4517,6 +4524,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
 - (SEL) selector;
 - (id) target;
 - (id) object;
+
 @end
 
 @implementation ProgressData
@@ -4669,7 +4677,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
     [self positionViews];
 }
 
-- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation {
+- (void) didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation {
     [self positionViews];
 }
 
@@ -6090,6 +6098,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
 /* Home Controller {{{ */
 @interface HomeController : CYBrowserController {
 }
+
 @end
 
 @implementation HomeController
@@ -6163,6 +6172,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
 }
 
 - (void) queueStatusDidChange;
+
 @end
 
 @implementation ManageController
@@ -6277,14 +6287,13 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
     [prompt_ setFrame:prmrect];
 }
 
-- (void)setFrame:(CGRect)frame {
+- (void) setFrame:(CGRect)frame {
     [super setFrame:frame];
-
     [self positionViews];
 }
 
 - (id) initWithFrame:(CGRect)frame delegate:(id)delegate {
-    if ((self = [super initWithFrame:frame])) {
+    if ((self = [super initWithFrame:frame]) != nil) {
         [self setAutoresizingMask:UIViewAutoresizingFlexibleWidth];
 
         [self setBarStyle:UIBarStyleBlack];
@@ -7040,8 +7049,8 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
     _trace();
 }
 
-- (void)editButtonClicked {
-    [self setEditing:!editing_];
+- (void) editButtonClicked {
+    [self setEditing:(!editing_)];
 }
 
 @end
@@ -7351,7 +7360,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
     } return self;
 }
 
-- (void)viewDidAppear:(BOOL)animated {
+- (void) viewDidAppear:(BOOL)animated {
     [super viewDidAppear:animated];
 
     if (!searchloaded_) {
@@ -7521,7 +7530,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
 }
 
 - (id) initWithDatabase:(Database *)database package:(NSString *)package {
-    if ((self = [super init])) {
+    if ((self = [super init]) != nil) {
         database_ = database;
         name_ = [package retain];
     } return self;
@@ -7860,12 +7869,12 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
     [[self navigationController] pushViewController:controller animated:YES];
 }
 
-- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
+- (BOOL) tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
     Source *source = [self sourceAtIndexPath:indexPath];
     return [source record] != nil;
 }
 
-- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
+- (void) tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
     Source *source = [self sourceAtIndexPath:indexPath];
     [Sources_ removeObjectForKey:[source key]];
     [delegate_ syncData];
@@ -8019,7 +8028,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
     return [[[NSURLConnection alloc] initWithRequest:request delegate:self] autorelease];
 }
 
-- (void)alertView:(UIAlertView *)alert clickedButtonAtIndex:(NSInteger)button {
+- (void) alertView:(UIAlertView *)alert clickedButtonAtIndex:(NSInteger)button {
     NSString *context([alert context]);
 
     if ([context isEqualToString:@"source"]) {
@@ -8272,7 +8281,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
 }
 
 - (id) initWithDatabase:(Database *)database delegate:(id)delegate {
-    if ((self = [super init])) {
+    if ((self = [super init]) != nil) {
         database_ = database;
         roledelegate_ = delegate;
     } return self;
@@ -8364,7 +8373,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
     return 0; // :(
 }
 
-- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
+- (UITableViewCell *) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
     return nil; // This method is required by the protocol.
 }
 
@@ -8402,6 +8411,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
     UILabel *status_;
     UILabel *caption_;
 }
+
 @end
 
 @implementation StashController
@@ -9188,7 +9198,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
     [tabbar_ setUpdateDelegate:self];
 }
 
-- (CYEmulatedLoadingController *)showEmulatedLoadingControllerInView:(UIView *)view {
+- (CYEmulatedLoadingController *) showEmulatedLoadingControllerInView:(UIView *)view {
     static CYEmulatedLoadingController *fake = nil;
 
     if (view != nil) {
index 1d06b0b92a1db5118221e720301adc9f04aeae17..340db4d42a1b86831da31f10a7ca1cd2208f98b1 100644 (file)
@@ -9,7 +9,7 @@
 @interface UCNavigationController : UINavigationController {
     _transient id<HookProtocol> hook_;
 }
-- (void) setHook:(id<HookProtocol>)hook;
-@end
 
+- (void) setHook:(id<HookProtocol>)hook;
 
+@end
index 7fbbd5c3c7bc5cc2ee22023009ae6580a099d0f3..e714de0e920b8aeca10466762b91aa2302a10b98 100644 (file)
 
 #import "RVPage.h"
 
-
 @implementation UCNavigationController
+
 - (void) setHook:(id<HookProtocol>)hook {
     hook_ = hook;
 }
+
 - (void) dismissModalViewControllerAnimated:(BOOL)animated {
     [super dismissModalViewControllerAnimated:YES];
 
     if (hook_ != nil)
         [hook_ didDismissModalViewController];
 }
-@end
-
 
+@end
index 5d1346e81e856815491bcc0f95713b607e5d1a96..9e82ef29a76f26f0cfc7459ae055add271b7fb62 100644 (file)
 // The default implementation of this method is essentially a no-op,
 // but calling the superclass implementation is *required*.
 - (void) reloadData;
+
 // This URL is used to save the state of the view controller. Return
 // nil if you cannot or should not save the URL for this page.
-- (NSURL *)navigationURL;
+- (NSURL *) navigationURL;
+
 // By default, this delegate is unused. However, it's provided here in case
 // you need some kind of delegate in a subclass.
 - (void) setDelegate:(id)delegate;
-- (id)delegate;
+- (id) delegate;
+
 // Override this in subclasses if you manage the "has seen first load" state yourself.
 - (BOOL) hasLoaded;
+
 // This is called when the view managed by the view controller is released.
 // That is not always when the controller itself is released: it also can
 // happen when more memory is needed by the system or whenever the controller
 // just happens not to be visible.
 - (void) releaseSubviews;
-@end
 
+@end