mirror of
https://github.com/transmission/transmission.git
synced 2025-12-25 04:45:56 +00:00
Modern Objective-C syntax (#509)
* Update enabled complier warnings * Convert to Modern Objective-C syntax using Xcode's tool * Convert to modern objc syntax manually, fix some PR issues * Remove unnecessary parentheses * Use property syntax for all custom properties * Use property syntax for all system properties * Fix erroneously autoreleased values * Revert VDKQueue to old objc syntax Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com> Co-authored-by: Mitch Livingston <livings124@mac.com>
This commit is contained in:
@@ -22,13 +22,12 @@
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
typedef enum
|
||||
{
|
||||
typedef NS_ENUM(unsigned int, port_status_t) {
|
||||
PORT_STATUS_CHECKING,
|
||||
PORT_STATUS_OPEN,
|
||||
PORT_STATUS_CLOSED,
|
||||
PORT_STATUS_ERROR
|
||||
} port_status_t;
|
||||
};
|
||||
|
||||
@interface PortChecker : NSObject
|
||||
{
|
||||
@@ -41,9 +40,9 @@ typedef enum
|
||||
NSTimer * fTimer;
|
||||
}
|
||||
|
||||
- (id) initForPort: (NSInteger) portNumber delay: (BOOL) delay withDelegate: (id) delegate;
|
||||
- (instancetype) initForPort: (NSInteger) portNumber delay: (BOOL) delay withDelegate: (id) delegate;
|
||||
- (void) cancelProbe;
|
||||
|
||||
- (port_status_t) status;
|
||||
@property (nonatomic, readonly) port_status_t status;
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user