Revision: 24041
          http://sourceforge.net/p/bibdesk/svn/24041
Author:   hofman
Date:     2019-07-17 13:20:46 +0000 (Wed, 17 Jul 2019)
Log Message:
-----------
get hash of fields dictionary rather than hash of every field

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

Modified: trunk/bibdesk/BibItem.m
===================================================================
--- trunk/bibdesk/BibItem.m     2019-07-17 11:44:48 UTC (rev 24040)
+++ trunk/bibdesk/BibItem.m     2019-07-17 13:20:46 UTC (rev 24041)
@@ -132,13 +132,11 @@
        
        // hash only the standard fields; are these all we should compare?
        BDSKTypeManager *btm = [BDSKTypeManager sharedManager];
-       NSMutableSet *keys = [[NSMutableSet alloc] initWithCapacity:20];
+       NSMutableArray *keys = [[NSMutableArray alloc] initWithCapacity:20];
        [keys addObjectsFromArray:[btm requiredFieldsForType:type]];
        [keys addObjectsFromArray:[btm optionalFieldsForType:type]];
     [keys removeObject:BDSKLocalUrlString];
-       
-       for (NSString *key in keys)
-        hash ^= [[(BibItem *)item stringValueOfField:key inherit:NO] hash];
+    hash ^= [[[(BibItem *)item pubFields] dictionaryWithValuesForKeys:keys] 
hash];
     [keys release];
     
     return hash;

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



_______________________________________________
Bibdesk-commit mailing list
Bibdesk-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit

Reply via email to