Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style(blocks): Remove () and (void) before block declarations #307

Merged
merged 1 commit into from
Oct 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Sources/Amplitude/AMPDatabaseHelper.m
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ - (BOOL)inDatabase:(void (^)(sqlite3 *db))block {

__block BOOL success = YES;

dispatch_sync(_queue, ^() {
dispatch_sync(_queue, ^{
if (sqlite3_open([self->_databasePath UTF8String], &self->_database) != SQLITE_OK) {
AMPLITUDE_LOG(@"Failed to open database");
sqlite3_close(self->_database);
Expand Down Expand Up @@ -189,7 +189,7 @@ - (BOOL)inDatabaseWithStatement:(NSString*)SQLString block:(void (^)(sqlite3_stm

__block BOOL success = YES;

dispatch_sync(_queue, ^() {
dispatch_sync(_queue, ^{
if (sqlite3_open([self->_databasePath UTF8String], &self->_database) != SQLITE_OK) {
AMPLITUDE_LOG(@"Failed to open database");
sqlite3_close(self->_database);
Expand Down
6 changes: 3 additions & 3 deletions Sources/Amplitude/AMPEventExplorer.m
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ - (instancetype)initWithInstanceName:(NSString *)instanceName {
}

- (void)showBubbleView {
dispatch_async(dispatch_get_main_queue(), ^(void){
dispatch_async(dispatch_get_main_queue(), ^{
CGRect screenRect = [[UIScreen mainScreen] bounds];
CGFloat screenWidth = screenRect.size.width;
CGFloat screenHeight = screenRect.size.height;
Expand All @@ -58,7 +58,7 @@ - (void)showBubbleView {
35)];

dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC));
dispatch_after(popTime, dispatch_get_main_queue(), ^(void) {
dispatch_after(popTime, dispatch_get_main_queue(), ^{
[[AMPUtils getKeyWindow] addSubview:self.bubbleView];
});

Expand All @@ -68,7 +68,7 @@ - (void)showBubbleView {
}

- (void)showInfoView {
dispatch_async(dispatch_get_main_queue(), ^(void){
dispatch_async(dispatch_get_main_queue(), ^{
if (self.bubbleView != nil) {
UIViewController *rootViewController = [[AMPUtils getKeyWindow] rootViewController];

Expand Down
2 changes: 1 addition & 1 deletion Sources/Amplitude/Amplitude.m
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ - (void)initializeApiKey:(NSString *)apiKey
// Release build
#if !RELEASE
if (self.showEventExplorer) {
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^(void) {
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{

if (self.eventExplorer == nil) {
self.eventExplorer = [[AMPEventExplorer alloc] initWithInstanceName:self.instanceName];
Expand Down