Skip to content

Commit

Permalink
style(blocks): Remove () and (void) param lists in block declarat…
Browse files Browse the repository at this point in the history
…ions (#307)
  • Loading branch information
JanNash authored Oct 21, 2020
1 parent 32995c2 commit 18710c5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
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

0 comments on commit 18710c5

Please sign in to comment.