From c379d132c14b4aff3cd1e80089b2684f98900980 Mon Sep 17 00:00:00 2001 From: Gautier Pelloux-Prayer Date: Thu, 10 Sep 2015 17:30:00 +0200 Subject: [PATCH] remove self-> --- Classes/AboutView.m | 3 +-- Classes/CallView.m | 4 ++-- Classes/ChatConversationTableView.m | 16 +++++++------- Classes/ChatConversationView.m | 13 +++++------ Classes/ChatsListTableView.m | 2 +- Classes/DialerView.m | 2 +- Classes/LinphoneAppDelegate.m | 2 +- Classes/LinphoneManager.m | 10 ++++----- Classes/LinphoneUI/UICallCell.m | 34 ++++++++++++++--------------- Classes/LinphoneUI/UIChatCell.m | 2 +- Classes/LinphoneUI/UIHistoryCell.m | 2 +- Classes/SideMenuTableView.m | 4 ++-- 12 files changed, 46 insertions(+), 48 deletions(-) diff --git a/Classes/AboutView.m b/Classes/AboutView.m index 0fff361dc..d65b1fd77 100644 --- a/Classes/AboutView.m +++ b/Classes/AboutView.m @@ -39,8 +39,7 @@ - (id)init { self = [super initWithNibName:NSStringFromClass(self.class) bundle:[NSBundle mainBundle]]; if (self != nil) { - self->linkTapGestureRecognizer = - [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(onLinkTap:)]; + linkTapGestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(onLinkTap:)]; } return self; } diff --git a/Classes/CallView.m b/Classes/CallView.m index cfa28ffd9..ad2aaa938 100644 --- a/Classes/CallView.m +++ b/Classes/CallView.m @@ -43,8 +43,8 @@ const NSInteger SECURE_BUTTON_TAG = 5; - (id)init { self = [super initWithNibName:NSStringFromClass(self.class) bundle:[NSBundle mainBundle]]; if (self != nil) { - self->singleFingerTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(showControls:)]; - self->videoZoomHandler = [[VideoZoomHandler alloc] init]; + singleFingerTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(showControls:)]; + videoZoomHandler = [[VideoZoomHandler alloc] init]; } return self; } diff --git a/Classes/ChatConversationTableView.m b/Classes/ChatConversationTableView.m index 2844ec625..cc2cd11bb 100644 --- a/Classes/ChatConversationTableView.m +++ b/Classes/ChatConversationTableView.m @@ -63,7 +63,7 @@ static UIFont *CELL_FONT = nil; if (!chatRoom) return; [self clearMessageList]; - self->messageList = linphone_chat_room_get_history(chatRoom, 0); + messageList = linphone_chat_room_get_history(chatRoom, 0); // also append transient upload messages because they are not in history yet! for (FileTransferDelegate *ftd in [[LinphoneManager instance] fileTransferDelegates]) { @@ -72,7 +72,7 @@ static UIFont *CELL_FONT = nil; const LinphoneAddress *peer = linphone_chat_room_get_peer_address(chatRoom); if (linphone_address_equal(ftd_peer, peer) && linphone_chat_message_is_outgoing(ftd.message)) { LOGI(@"Appending transient upload message %p", ftd.message); - self->messageList = ms_list_append(self->messageList, linphone_chat_message_ref(ftd.message)); + messageList = ms_list_append(messageList, linphone_chat_message_ref(ftd.message)); } } } @@ -95,7 +95,7 @@ static UIFont *CELL_FONT = nil; } - (void)updateChatEntry:(LinphoneChatMessage *)chat { - NSInteger index = ms_list_index(self->messageList, chat); + NSInteger index = ms_list_index(messageList, chat); if (index < 0) { LOGW(@"chat entry doesn't exist"); return; @@ -120,7 +120,7 @@ static UIFont *CELL_FONT = nil; LOGE(@"No data to debug"); return; } - MSList *item = self->messageList; + MSList *item = messageList; int count = 0; while (item) { LinphoneChatMessage *msg = (LinphoneChatMessage *)item->data; @@ -173,12 +173,12 @@ static UIFont *CELL_FONT = nil; } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { - return ms_list_size(self->messageList); + return ms_list_size(messageList); } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { NSString *kCellId = nil; - LinphoneChatMessage *chat = ms_list_nth_data(self->messageList, (int)[indexPath row]); + LinphoneChatMessage *chat = ms_list_nth_data(messageList, (int)[indexPath row]); if (linphone_chat_message_get_file_transfer_information(chat) || linphone_chat_message_get_external_body_url(chat)) { kCellId = NSStringFromClass(UIChatBubblePhotoCell.class); @@ -201,7 +201,7 @@ static UIFont *CELL_FONT = nil; forRowAtIndexPath:(NSIndexPath *)indexPath { if (editingStyle == UITableViewCellEditingStyleDelete) { [tableView beginUpdates]; - LinphoneChatMessage *chat = ms_list_nth_data(self->messageList, (int)[indexPath row]); + LinphoneChatMessage *chat = ms_list_nth_data(messageList, (int)[indexPath row]); if (chat) { linphone_chat_room_delete_message(chatRoom, chat); messageList = ms_list_remove(messageList, chat); @@ -223,7 +223,7 @@ static UIFont *CELL_FONT = nil; } - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { - LinphoneChatMessage *message = ms_list_nth_data(self->messageList, (int)[indexPath row]); + LinphoneChatMessage *message = ms_list_nth_data(messageList, (int)[indexPath row]); return [self.class viewSize:message width:[self.view frame].size.width].height; } diff --git a/Classes/ChatConversationView.m b/Classes/ChatConversationView.m index e4a017e8e..956a1cd9a 100644 --- a/Classes/ChatConversationView.m +++ b/Classes/ChatConversationView.m @@ -45,17 +45,16 @@ - (id)init { self = [super initWithNibName:NSStringFromClass(self.class) bundle:[NSBundle mainBundle]]; if (self != nil) { - self->scrollOnGrowingEnabled = TRUE; - self->chatRoom = NULL; - self->listTapGestureRecognizer = - [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(onListTap:)]; + scrollOnGrowingEnabled = TRUE; + chatRoom = NULL; + listTapGestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(onListTap:)]; self.listSwipeGestureRecognizer = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(onListSwipe:)]; - self->imageQualities = [[OrderedDictionary alloc] + imageQualities = [[OrderedDictionary alloc] initWithObjectsAndKeys:[NSNumber numberWithFloat:0.9], NSLocalizedString(@"Maximum", nil), [NSNumber numberWithFloat:0.5], NSLocalizedString(@"Average", nil), [NSNumber numberWithFloat:0.0], NSLocalizedString(@"Minimum", nil), nil]; - self->composingVisible = TRUE; + composingVisible = TRUE; } return self; } @@ -163,7 +162,7 @@ static UICompositeViewDescription *compositeDescription = nil; #pragma mark - - (void)setChatRoom:(LinphoneChatRoom *)room { - self->chatRoom = room; + chatRoom = room; [messageField setText:@""]; [tableController setChatRoom:room]; if (chatRoom != NULL) { diff --git a/Classes/ChatsListTableView.m b/Classes/ChatsListTableView.m index 4fcfe0657..1720e0ff4 100644 --- a/Classes/ChatsListTableView.m +++ b/Classes/ChatsListTableView.m @@ -36,7 +36,7 @@ - (instancetype)init { self = super.init; if (self) { - self->data = nil; + data = nil; } return self; } diff --git a/Classes/DialerView.m b/Classes/DialerView.m index 79d52e7c6..dc4a95e1b 100644 --- a/Classes/DialerView.m +++ b/Classes/DialerView.m @@ -57,7 +57,7 @@ - (id)init { self = [super initWithNibName:NSStringFromClass(self.class) bundle:[NSBundle mainBundle]]; if (self) { - self->transferMode = FALSE; + transferMode = FALSE; } return self; } diff --git a/Classes/LinphoneAppDelegate.m b/Classes/LinphoneAppDelegate.m index 64d1c2ea3..b69b6ea86 100644 --- a/Classes/LinphoneAppDelegate.m +++ b/Classes/LinphoneAppDelegate.m @@ -39,7 +39,7 @@ - (id)init { self = [super init]; if (self != nil) { - self->startedInBackground = FALSE; + startedInBackground = FALSE; } return self; } diff --git a/Classes/LinphoneManager.m b/Classes/LinphoneManager.m index 4d0f0d6c5..0d46e648d 100644 --- a/Classes/LinphoneManager.m +++ b/Classes/LinphoneManager.m @@ -93,10 +93,10 @@ NSString *const kLinphoneInternalChatDBFilename = @"linphone_chats.db"; @implementation LinphoneCallAppData - (id)init { if ((self = [super init])) { - self->batteryWarningShown = FALSE; - self->notification = nil; - self->videoRequested = FALSE; - self->userInfos = [[NSMutableDictionary alloc] init]; + batteryWarningShown = FALSE; + notification = nil; + videoRequested = FALSE; + userInfos = [[NSMutableDictionary alloc] init]; } return self; } @@ -275,7 +275,7 @@ struct codec_name_pref_table codec_pref_table[] = {{"speex", 8000, "speex_8k_pre pushCallIDs = [[NSMutableArray alloc] init]; photoLibrary = [[ALAssetsLibrary alloc] init]; - self->_isTesting = [LinphoneManager isRunningTests]; + _isTesting = [LinphoneManager isRunningTests]; [self renameDefaultSettings]; [self copyDefaultSettings]; diff --git a/Classes/LinphoneUI/UICallCell.m b/Classes/LinphoneUI/UICallCell.m index e02dbce6f..f33febf8a 100644 --- a/Classes/LinphoneUI/UICallCell.m +++ b/Classes/LinphoneUI/UICallCell.m @@ -34,8 +34,8 @@ - (id)init:(LinphoneCall *)acall { self = [super init]; if (self != nil) { - self->view = UICallCellOtherView_Avatar; - self->call = acall; + view = UICallCellOtherView_Avatar; + call = acall; image = [UIImage imageNamed:@"avatar_unknown.png"]; address = NSLocalizedString(@"Unknown", nil); [self update]; @@ -126,24 +126,24 @@ [self addSubview:sub]; } - self->currentCall = FALSE; + currentCall = FALSE; _outgoingRingCountLabel.hidden = YES; _outgoingRingCountLabel.text = @"0"; - self->detailsRightSwipeGestureRecognizer = + detailsRightSwipeGestureRecognizer = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(doDetailsSwipe:)]; [detailsRightSwipeGestureRecognizer setDirection:UISwipeGestureRecognizerDirectionLeft]; [otherView addGestureRecognizer:detailsRightSwipeGestureRecognizer]; - self->detailsRightSwipeGestureRecognizer = + detailsRightSwipeGestureRecognizer = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(doDetailsSwipe:)]; [detailsRightSwipeGestureRecognizer setDirection:UISwipeGestureRecognizerDirectionRight]; [otherView addGestureRecognizer:detailsRightSwipeGestureRecognizer]; - [self->avatarView setHidden:TRUE]; - [self->audioStatsView setHidden:TRUE]; - [self->videoStatsView setHidden:TRUE]; + [avatarView setHidden:TRUE]; + [audioStatsView setHidden:TRUE]; + [videoStatsView setHidden:TRUE]; [UICallCell adaptSize:audioCodecHeaderLabel field:audioCodecLabel]; [UICallCell adaptSize:audioDownloadBandwidthHeaderLabel field:audioDownloadBandwidthLabel]; @@ -447,17 +447,17 @@ return; } if (data->view == UICallCellOtherView_Avatar && avatarView.isHidden) { - [self->avatarView setHidden:FALSE]; - [self->audioStatsView setHidden:TRUE]; - [self->videoStatsView setHidden:TRUE]; + [avatarView setHidden:FALSE]; + [audioStatsView setHidden:TRUE]; + [videoStatsView setHidden:TRUE]; } else if (data->view == UICallCellOtherView_AudioStats && audioStatsView.isHidden) { - [self->avatarView setHidden:TRUE]; - [self->audioStatsView setHidden:FALSE]; - [self->videoStatsView setHidden:TRUE]; + [avatarView setHidden:TRUE]; + [audioStatsView setHidden:FALSE]; + [videoStatsView setHidden:TRUE]; } else if (data->view == UICallCellOtherView_VideoStats && videoStatsView.isHidden) { - [self->avatarView setHidden:TRUE]; - [self->audioStatsView setHidden:TRUE]; - [self->videoStatsView setHidden:FALSE]; + [avatarView setHidden:TRUE]; + [audioStatsView setHidden:TRUE]; + [videoStatsView setHidden:FALSE]; } } diff --git a/Classes/LinphoneUI/UIChatCell.m b/Classes/LinphoneUI/UIChatCell.m index 7d66a60cc..7b4ea2f2d 100644 --- a/Classes/LinphoneUI/UIChatCell.m +++ b/Classes/LinphoneUI/UIChatCell.m @@ -48,7 +48,7 @@ #pragma mark - Property Funcitons - (void)setChatRoom:(LinphoneChatRoom *)achat { - self->chatRoom = achat; + chatRoom = achat; [self update]; } diff --git a/Classes/LinphoneUI/UIHistoryCell.m b/Classes/LinphoneUI/UIHistoryCell.m index d570bea0b..b2487e00a 100644 --- a/Classes/LinphoneUI/UIHistoryCell.m +++ b/Classes/LinphoneUI/UIHistoryCell.m @@ -38,7 +38,7 @@ [self.contentView addSubview:[arrayOfViews objectAtIndex:0]]; } - self->callLog = NULL; + callLog = NULL; } return self; } diff --git a/Classes/SideMenuTableView.m b/Classes/SideMenuTableView.m index dfc8f2695..615e86670 100644 --- a/Classes/SideMenuTableView.m +++ b/Classes/SideMenuTableView.m @@ -16,8 +16,8 @@ - (id)initWithTitle:(NSString *)atitle tapBlock:(SideMenuEntryBlock)tapBlock { if ((self = [super init])) { - self->title = atitle; - self->onTapBlock = tapBlock; + title = atitle; + onTapBlock = tapBlock; } return self; }