Revision: 16754
http://sourceforge.net/p/skim-app/code/16754
Author: hofman
Date: 2026-10-30 22:16:11 +0000 (Fri, 30 Oct 2026)
Log Message:
-----------
use typeof(self) instead of explicit type
Modified Paths:
--------------
trunk/SKFileUpdateChecker.m
trunk/SKPDFView.m
trunk/SKSyncDot.m
trunk/SKTimerView.m
trunk/SKTypeSelectHelper.m
Modified: trunk/SKFileUpdateChecker.m
===================================================================
--- trunk/SKFileUpdateChecker.m 2026-10-30 17:31:38 UTC (rev 16753)
+++ trunk/SKFileUpdateChecker.m 2026-10-30 22:16:11 UTC (rev 16754)
@@ -114,7 +114,7 @@
}
- (void)startTimerCheckingFileReplacement {
- __weak SKFileUpdateChecker *weakSelf = self;
+ __weak typeof(self) weakSelf = self;
fileUpdateTimer = [[NSTimer alloc] initWithFireDate:[NSDate
dateWithTimeIntervalSinceNow:0.1] interval:2.0 repeats:YES block:^(NSTimer
*timer){
[weakSelf checkForFileReplacement];
}];
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2026-10-30 17:31:38 UTC (rev 16753)
+++ trunk/SKPDFView.m 2026-10-30 22:16:11 UTC (rev 16754)
@@ -1062,7 +1062,7 @@
[self stopPacer];
} else if (pacerSpeed > 0.0 && [[self document] isLocked] == NO) {
CGFloat interval;
- __weak SKPDFView *weakSelf = self;
+ __weak typeof(self) weakSelf = self;
void (^block)(NSTimer *) = nil;
if ([self hasReadingBar]) {
pacerCounter = 0;
Modified: trunk/SKSyncDot.m
===================================================================
--- trunk/SKSyncDot.m 2026-10-30 17:31:38 UTC (rev 16753)
+++ trunk/SKSyncDot.m 2026-10-30 22:16:11 UTC (rev 16754)
@@ -59,7 +59,7 @@
point = aPoint;
page = aPage;
phase = 0;
- __weak SKSyncDot *weakSelf = self;
+ __weak typeof(self) weakSelf = self;
timer = [NSTimer scheduledTimerWithTimeInterval:0.05 repeats:YES
block:^(NSTimer *t){ [weakSelf animate]; }];
handler = [aHandler copy];
}
@@ -82,7 +82,7 @@
- (void)animate {
if (atomic_fetch_add(&phase, 1) >= 9) {
[timer invalidate];
- __weak SKSyncDot *weakSelf = self;
+ __weak typeof(self) weakSelf = self;
timer = [NSTimer scheduledTimerWithTimeInterval:5.0 repeats:NO
block:^(NSTimer *t){ [weakSelf finish]; }];
}
if (handler) handler(NO);
Modified: trunk/SKTimerView.m
===================================================================
--- trunk/SKTimerView.m 2026-10-30 17:31:38 UTC (rev 16753)
+++ trunk/SKTimerView.m 2026-10-30 22:16:11 UTC (rev 16754)
@@ -113,7 +113,7 @@
if (showsTime == NO) {
if (timer == nil) {
startDate = [NSDate date];
- __weak SKTimerView *weakSelf = self;
+ __weak typeof(self) weakSelf = self;
timer = [NSTimer scheduledTimerWithTimeInterval:1.0 repeats:YES
block:^(NSTimer *aTimer){
[weakSelf updateTime];
}];
Modified: trunk/SKTypeSelectHelper.m
===================================================================
--- trunk/SKTypeSelectHelper.m 2026-10-30 17:31:38 UTC (rev 16753)
+++ trunk/SKTypeSelectHelper.m 2026-10-30 22:16:11 UTC (rev 16754)
@@ -207,7 +207,7 @@
[self updateSearchString:searchString];
// Reset the timer if it hasn't expired yet
- __weak SKTypeSelectHelper *weakSelf = self;
+ __weak typeof(self) weakSelf = self;
[self startTimerWithBlock:^(NSTimer *aTimer){ [weakSelf
typeSelectSearchTimeout:aTimer]; }];
if (matchOption != SKFullStringMatch)
@@ -222,7 +222,7 @@
if ([searchString length])
[self updateSearchString:searchString];
- __weak SKTypeSelectHelper *weakSelf = self;
+ __weak typeof(self) weakSelf = self;
[self startTimerWithBlock:^(NSTimer *aTimer){ [weakSelf
typeSelectCleanTimeout:aTimer]; }];
processing = NO;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit