Revision: 13220
          http://sourceforge.net/p/skim-app/code/13220
Author:   hofman
Date:     2023-01-12 22:20:28 +0000 (Thu, 12 Jan 2023)
Log Message:
-----------
no need for atomic flag

Modified Paths:
--------------
    trunk/SKPDFPage.h
    trunk/SKPDFPage.m

Modified: trunk/SKPDFPage.h
===================================================================
--- trunk/SKPDFPage.h   2023-01-12 15:08:26 UTC (rev 13219)
+++ trunk/SKPDFPage.h   2023-01-12 22:20:28 UTC (rev 13220)
@@ -38,7 +38,6 @@
 
 #import <Cocoa/Cocoa.h>
 #import <Quartz/Quartz.h>
-#import <stdatomic.h>
 
 
 @interface SKPDFPage : PDFPage {
@@ -46,7 +45,7 @@
     NSInteger intrinsicRotation;
     NSInteger characterDirectionAngle;
     NSInteger lineDirectionAngle;
-    _Atomic(BOOL) didGetWidgets;
+    BOOL didGetWidgets;
     NSMutableArray *widgets;
 }
 @end

Modified: trunk/SKPDFPage.m
===================================================================
--- trunk/SKPDFPage.m   2023-01-12 15:08:26 UTC (rev 13219)
+++ trunk/SKPDFPage.m   2023-01-12 22:20:28 UTC (rev 13220)
@@ -84,10 +84,10 @@
 
 - (NSArray *)annotations {
     NSArray *annotations = [super annotations];
-    if (atomic_load(&didGetWidgets) == NO && [NSThread isMainThread]) {
+    if ([NSThread isMainThread] && didGetWidgets == NO) {
         PDFDocument *doc = [self document];
         if (doc && [doc isLocked] == NO) {
-            atomic_store(&didGetWidgets, YES);
+            didGetWidgets = YES;
             for (PDFAnnotation *annotation in annotations) {
                 if ([annotation isWidget]) {
                     if (widgets == nil)

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
Skim-app-commit mailing list
Skim-app-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to