Revision: 28506
          http://sourceforge.net/p/bibdesk/svn/28506
Author:   hofman
Date:     2024-01-01 19:33:53 +0000 (Mon, 01 Jan 2024)
Log Message:
-----------
use NSHashTable to collect fuzzy authors

Modified Paths:
--------------
    trunk/bibdesk/BDSKPersonController.m

Modified: trunk/bibdesk/BDSKPersonController.m
===================================================================
--- trunk/bibdesk/BDSKPersonController.m        2024-01-01 19:30:19 UTC (rev 
28505)
+++ trunk/bibdesk/BDSKPersonController.m        2024-01-01 19:33:53 UTC (rev 
28506)
@@ -53,6 +53,7 @@
 #import "NSPasteboard_BDSKExtensions.h"
 #import "NSFileManager_BDSKExtensions.h"
 #import "BDSKOwnerProtocol.h"
+#import "NSPointerFunctions_BDSKExtensions.h"
 
 @implementation BDSKPersonController
 
@@ -205,7 +206,7 @@
     publicationItems = [[NSMutableArray alloc] init];
     
     NSMutableSet *theNames = [NSMutableSet set];
-    NSMutableSet *peopleSet = [[NSMutableSet alloc] initForFuzzyAuthors];
+    NSHashTable *peopleSet = [[NSHashTable alloc] 
initWithPointerFunctions:[NSPointerFunctions fuzzyAuthorPointerFunctions] 
capacity:0];;
     NSArray *pubs = [owner publications];
     
     for (BibItem *pub in pubs) {
@@ -216,7 +217,8 @@
         for (NSString *field in fields) {
             NSArray *people = [pub peopleArrayForField:field];
             
-            [peopleSet addObjectsFromArray:people];
+            for (BibAuthor *author in people)
+                [peopleSet addObject:author];
             
             if ([peopleSet containsObject:person]) {
                 NSString *name;

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



_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit

Reply via email to