Skip to content

Commit

Permalink
Replace - (id)init with - (instancetype)init
Browse files Browse the repository at this point in the history
  • Loading branch information
cntrump committed Jul 27, 2022
1 parent 7f00cd8 commit 5e7cb04
Show file tree
Hide file tree
Showing 176 changed files with 254 additions and 254 deletions.
2 changes: 1 addition & 1 deletion Lemon/Controller/LMMainViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ @interface LMMainViewController ()

@implementation LMMainViewController

-(id)init{
-(instancetype)init{
self = [super initWithNibName:NSStringFromClass(self.class) bundle:[NSBundle bundleForClass:self.class]];
if (self) {

Expand Down
2 changes: 1 addition & 1 deletion Lemon/Controller/LMToolViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ @interface LMToolViewController ()<NSTableViewDelegate, NSTableViewDataSource, Q

@implementation LMToolViewController

-(id)init{
-(instancetype)init{
self = [super initWithNibName:NSStringFromClass(self.class) bundle:[NSBundle bundleForClass:self.class]];
if (self) {

Expand Down
2 changes: 1 addition & 1 deletion Lemon/LemonMainWndController.m
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ @interface LemonMainWndController ()<NSWindowDelegate>

@implementation LemonMainWndController

- (id)init
- (instancetype)init
{
static dispatch_once_t onceToken;
static LemonMainWndController *mainWindow;
Expand Down
2 changes: 1 addition & 1 deletion Lemon/LemonStartUpParams.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ + (LemonStartUpParams*)sharedInstance
});
return instance;
}
- (id)init{
- (instancetype)init{
self = [super init];
if (self) {
_paramsCmd = 0;
Expand Down
2 changes: 1 addition & 1 deletion Lemon/MobileNotification/QMMobileConnNotification.m
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ @interface QMMobileConnNotification()

@implementation QMMobileConnNotification

- (id)init
- (instancetype)init
{
if (self = [super init])
{
Expand Down
2 changes: 1 addition & 1 deletion Lemon/MobileNotification/QMUserNotificationCenter.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

@implementation QMUserNotificationCenter

- (id)init
- (instancetype)init
{
if (self = [super init])
{
Expand Down
2 changes: 1 addition & 1 deletion Lemon/Preference/PreferenceASViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ @interface PreferenceASViewController ()

@implementation PreferenceASViewController

-(id)init{
-(instancetype)init{
self = [super initWithNibName:NSStringFromClass(self.class) bundle:[NSBundle bundleForClass:self.class]];
if (self) {

Expand Down
2 changes: 1 addition & 1 deletion Lemon/Preference/PreferenceViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
@property (weak, nonatomic) PreferenceWindowController* myWC;


-(id)initWithPreferenceWindowController:(PreferenceWindowController *)wdControler;
-(instancetype)initWithPreferenceWindowController:(PreferenceWindowController *)wdControler;

- (instancetype)init;
#define STATUS_TYPE_LOGO 1
Expand Down
2 changes: 1 addition & 1 deletion Lemon/Preference/PreferenceViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ @interface PreferenceViewController ()

@implementation PreferenceViewController

-(id)initWithPreferenceWindowController:(PreferenceWindowController *)wdControle{
-(instancetype)initWithPreferenceWindowController:(PreferenceWindowController *)wdControle{
self = [super init];
if (self) {
self.myWC = wdControle;
Expand Down
2 changes: 1 addition & 1 deletion Lemon/Splash/BFPageControl.m
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ @implementation BFPageControl

#pragma mark - Init

-(id)initWithFrame: (NSRect)frameRect
-(instancetype)initWithFrame: (NSRect)frameRect
{
if(self = [super initWithFrame: frameRect])
{
Expand Down
2 changes: 1 addition & 1 deletion Lemon/View/Cell/ToolTableCellView.m
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ @interface ToolTableCellView()<MyAnimateCellViewDelegate>

@implementation ToolTableCellView

-(id)initWithFrame:(NSRect)frameRect{
-(instancetype)initWithFrame:(NSRect)frameRect{
self = [super initWithFrame:frameRect];
if (self) {
[self setupUI];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ @interface LMCleanBigViewController ()<NSOutlineViewDelegate, NSOutlineViewDataS

@implementation LMCleanBigViewController

-(id)init{
-(instancetype)init{
self = [super initWithNibName:NSStringFromClass(self.class) bundle:[NSBundle bundleForClass:self.class]];
if (self) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ @interface LMCleanResultViewController ()<NSTableViewDelegate, NSTableViewDataSo

@implementation LMCleanResultViewController

-(id)init{
-(instancetype)init{
self = [super initWithNibName:NSStringFromClass(self.class) bundle:[NSBundle bundleForClass:self.class]];
if (self) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ @interface LMCleanScanViewController ()<QMCleanManagerDelegate, CategoryProgress

@implementation LMCleanScanViewController

-(id)init{
-(instancetype)init{
self = [super initWithNibName:NSStringFromClass(self.class) bundle:[NSBundle bundleForClass:self.class]];
if (self) {

Expand Down
2 changes: 1 addition & 1 deletion LemonClener/LemonClener/Model/ToolModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
@property (strong, nonatomic) NSString *toolDesc;
@property (assign, nonatomic) NSInteger reportId;

-(id)initWithToolId:(NSString *)toolId toolPicName:(NSString *)toolPicName className:(NSString *)className toolName:(NSString *)toolName toolDesc:(NSString *)toolDesc reportId:(NSInteger)reportId;
-(instancetype)initWithToolId:(NSString *)toolId toolPicName:(NSString *)toolPicName className:(NSString *)className toolName:(NSString *)toolName toolDesc:(NSString *)toolDesc reportId:(NSInteger)reportId;

@end
2 changes: 1 addition & 1 deletion LemonClener/LemonClener/Model/ToolModel.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

@implementation ToolModel

-(id)initWithToolId:(NSString *)toolId toolPicName:(NSString *)toolPicName className:(NSString *)className toolName:(NSString *)toolName toolDesc:(NSString *)toolDesc reportId:(NSInteger)reportId{
-(instancetype)initWithToolId:(NSString *)toolId toolPicName:(NSString *)toolPicName className:(NSString *)className toolName:(NSString *)toolName toolDesc:(NSString *)toolDesc reportId:(NSInteger)reportId{
self = [super init];
if (self) {
self.toolId = toolId;
Expand Down
2 changes: 1 addition & 1 deletion LemonClener/LemonClener/QMCleanerManager/QMCleanManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ @interface QMCleanManager()
@end

@implementation QMCleanManager
- (id)init
- (instancetype)init
{
if (self = [super init])
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ @interface QMLiteCleanerManager()

@implementation QMLiteCleanerManager

- (id)init
- (instancetype)init
{
if (self = [super init])
{
Expand Down
2 changes: 1 addition & 1 deletion LemonClener/LemonClener/QMCleanerManager/QMRemoveManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ + (QMRemoveManager *)getInstance
return instance;
}

- (id)init
- (instancetype)init
{
if (self = [super init])
{
Expand Down
2 changes: 1 addition & 1 deletion LemonClener/LemonClener/QMCleanerManager/QMWarnReultItem.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
@property (nonatomic, assign) NSUInteger resultSize;
@property (nonatomic, assign) BOOL selected;

- (id)initWithPath:(NSString *)path;
- (instancetype)initWithPath:(NSString *)path;

- (void)addResultPathArray:(NSArray *)pathArray cleanType:(QMCleanType)type;
- (NSDictionary *)resultPathDict;
Expand Down
2 changes: 1 addition & 1 deletion LemonClener/LemonClener/QMCleanerManager/QMWarnReultItem.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ @implementation QMWarnReultItem
@synthesize iconImage;
@synthesize resultSize;

- (id)initWithPath:(NSString *)path
- (instancetype)initWithPath:(NSString *)path
{
if (self = [super init])
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ @interface BigCleanParaentCellView(){

@implementation BigCleanParaentCellView

-(id)initWithCoder:(NSCoder *)decoder{
-(instancetype)initWithCoder:(NSCoder *)decoder{
self = [super initWithCoder:decoder];
if (self) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

@implementation QMResultTableRowView

- (id)initWithFrame:(NSRect)frameRect
- (instancetype)initWithFrame:(NSRect)frameRect
{
if (self = [super initWithFrame:frameRect])
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

@implementation CategorySmallProgressView

-(id)initWithCoder:(NSCoder *)decoder{
-(instancetype)initWithCoder:(NSCoder *)decoder{
self = [super initWithCoder:decoder];
if (self) {
[self setWantsLayer:YES];
Expand Down
2 changes: 1 addition & 1 deletion LemonClener/LemonClener/View/CustomView/LMActivityCard.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

@implementation LMActivityCard

- (id)init {
- (instancetype)init {
self = [super init];
if (self) {

Expand Down
2 changes: 1 addition & 1 deletion LemonClener/LemonClener/libcleaner/QMFilterParse.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
}
@property (assign) id<QMScanDelegate> delegate;

- (id)initFilterDict:(NSDictionary *)filerDict;
- (instancetype)initFilterDict:(NSDictionary *)filerDict;

- (NSArray *)enumeratorAtFilePath:(QMActionItem *)item;

Expand Down
2 changes: 1 addition & 1 deletion LemonClener/LemonClener/libcleaner/QMFilterParse.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

@implementation QMFilterParse

- (id)initFilterDict:(NSDictionary *)filterDict
- (instancetype)initFilterDict:(NSDictionary *)filterDict
{
if (self = [super init])
{
Expand Down
2 changes: 1 addition & 1 deletion LemonClener/LemonClener/libcleaner/QMScanCategory.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ @implementation QMScanCategory
@synthesize delegate;
@synthesize isStopScan;

- (id)init
- (instancetype)init
{
if (self = [super init])
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
@implementation QMAppLeftScan
@synthesize delegate;

- (id)init
- (instancetype)init
{
if (self = [super init])
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
@implementation QMAppUnlessFile
@synthesize delegate;

- (id)init
- (instancetype)init
{
if (self = [super init])
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
@implementation QMDirectoryScan
@synthesize delegate;

- (id)init
- (instancetype)init
{
if (self = [super init])
{
Expand Down
16 changes: 8 additions & 8 deletions LemonClener/LemonClener/libcleaner/QMXMLItem/QMActionItem.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
@implementation QMActionAtomItem
@synthesize resultFilters;

-(id)copyWithZone:(NSZone *)zone{
-(instancetype)copyWithZone:(NSZone *)zone{
QMActionAtomItem *copy = [[QMActionAtomItem alloc] init];
if (copy) {
copy.resultFilters = [self.resultFilters copy];
Expand All @@ -22,7 +22,7 @@ -(id)copyWithZone:(NSZone *)zone{
return self;
}

-(id)mutableCopyWithZone:(NSZone *)zone{
-(instancetype)mutableCopyWithZone:(NSZone *)zone{
QMActionAtomItem *copy = [[QMActionAtomItem alloc] init];
if (copy) {
copy.resultFilters = [self.resultFilters copy];
Expand All @@ -40,7 +40,7 @@ @implementation QMActionPathItem
@synthesize level;
@synthesize scanFilters;

- (id)init
- (instancetype)init
{
if (self = [super init])
{
Expand All @@ -49,7 +49,7 @@ - (id)init
return self;
}

-(id)copyWithZone:(NSZone *)zone{
-(instancetype)copyWithZone:(NSZone *)zone{
QMActionPathItem *copy = [[QMActionPathItem alloc] init];
if (copy) {
copy.filename = [self.filename mutableCopy];
Expand All @@ -63,7 +63,7 @@ -(id)copyWithZone:(NSZone *)zone{
return self;
}

-(id)mutableCopyWithZone:(NSZone *)zone{
-(instancetype)mutableCopyWithZone:(NSZone *)zone{
QMActionPathItem *copy = [[QMActionPathItem alloc] init];
if (copy) {
copy.filename = [self.filename mutableCopy];
Expand Down Expand Up @@ -97,7 +97,7 @@ @implementation QMActionItem
@synthesize appVersion;
@synthesize buildVersion;

- (id)init
- (instancetype)init
{
if (self = [super init])
{
Expand All @@ -114,7 +114,7 @@ - (id)init
return self;
}

-(id)copyWithZone:(NSZone *)zone{
-(instancetype)copyWithZone:(NSZone *)zone{
QMActionItem *copy = [super copyWithZone:zone];
if (copy) {
copy.actionID = [self.actionID mutableCopy];
Expand Down Expand Up @@ -143,7 +143,7 @@ -(id)copyWithZone:(NSZone *)zone{
return copy;
}

-(id)mutableCopyWithZone:(NSZone *)zone{
-(instancetype)mutableCopyWithZone:(NSZone *)zone{
QMActionItem *copy = [super mutableCopyWithZone:zone];
if (copy) {
copy.actionID = [self.actionID mutableCopy];
Expand Down
4 changes: 2 additions & 2 deletions LemonClener/LemonClener/libcleaner/QMXMLItem/QMBaseItem.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ @implementation QMBaseItem
@synthesize progressValue;
@synthesize state;

-(id)copyWithZone:(NSZone *)zone{
-(instancetype)copyWithZone:(NSZone *)zone{
QMBaseItem *copy = [[[self class] alloc] init];
if (copy) {
copy.progressValue = self.progressValue;
Expand All @@ -26,7 +26,7 @@ -(id)copyWithZone:(NSZone *)zone{
return copy;
}

-(id)mutableCopyWithZone:(NSZone *)zone{
-(instancetype)mutableCopyWithZone:(NSZone *)zone{
QMBaseItem *copy = [[[self class] alloc] init];
if (copy) {
copy.progressValue = self.progressValue;
Expand Down
Loading

0 comments on commit 5e7cb04

Please sign in to comment.