Revision: 28519
          http://sourceforge.net/p/bibdesk/svn/28519
Author:   hofman
Date:     2024-01-03 16:53:16 +0000 (Wed, 03 Jan 2024)
Log Message:
-----------
use NSObject implementation of hash to get default hash

Modified Paths:
--------------
    trunk/bibdesk/BDSKLastImportGroup.m
    trunk/bibdesk/Bibdesk_Prefix.pch

Modified: trunk/bibdesk/BDSKLastImportGroup.m
===================================================================
--- trunk/bibdesk/BDSKLastImportGroup.m 2024-01-03 16:49:20 UTC (rev 28518)
+++ trunk/bibdesk/BDSKLastImportGroup.m 2024-01-03 16:53:16 UTC (rev 28519)
@@ -78,6 +78,6 @@
 
 - (BOOL)isEqual:(id)other { return other == self; }
 
-- (NSUInteger)hash { return BDSKHash(self); }
+- (NSUInteger)hash { return ((NSUInteger(*)(id, SEL))[NSObject 
instanceMethodForSelector:_cmd])(self, _cmd); }
 
 @end

Modified: trunk/bibdesk/Bibdesk_Prefix.pch
===================================================================
--- trunk/bibdesk/Bibdesk_Prefix.pch    2024-01-03 16:49:20 UTC (rev 28518)
+++ trunk/bibdesk/Bibdesk_Prefix.pch    2024-01-03 16:53:16 UTC (rev 28519)
@@ -81,8 +81,5 @@
     #define BDSKCFDESTROY(variable) do { if (variable) CFRelease(variable); 
variable = NULL; } while (0)
     #define BDSKZONEDESTROY(variable) do { if (variable) 
NSZoneFree(NSZoneFromPointer((void *)variable), (void *)variable); variable = 
NULL; } while (0)
     #define BDSKDISPATCHDESTROY(variable) do { if (variable) 
dispatch_release(variable); variable = NULL; } while (0)
-    
-    // see e.g. 
http://www.mulle-kybernetik.com/artikel/Optimization/opti-7.html, perhaps this 
could be improved on 64-bits
-    #define BDSKHash(self) (((NSUInteger) self >> 4) | ((NSUInteger) self << 
(32 - 4)))
 
 #endif

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