Revision: 28509
          http://sourceforge.net/p/bibdesk/svn/28509
Author:   hofman
Date:     2024-01-01 23:50:39 +0000 (Mon, 01 Jan 2024)
Log Message:
-----------
add a few simple __bridge

Modified Paths:
--------------
    trunk/bibdesk/BDSKCondition.m
    trunk/bibdesk/BDSKDBLPGroupServer.m
    trunk/bibdesk/BDSKScriptGroup.m
    trunk/bibdesk/BDSKServerInfo.m
    trunk/bibdesk/BDSKWebGroup.m
    trunk/bibdesk/BibAuthor.m

Modified: trunk/bibdesk/BDSKCondition.m
===================================================================
--- trunk/bibdesk/BDSKCondition.m       2024-01-01 23:08:31 UTC (rev 28508)
+++ trunk/bibdesk/BDSKCondition.m       2024-01-01 23:50:39 UTC (rev 28509)
@@ -265,7 +265,7 @@
         CFRange range;
         
         for (NSString *itemValue in itemValues) {
-            if (CFStringFindWithOptions((CFStringRef)itemValue, 
(CFStringRef)stringValue, CFRangeMake(0, [itemValue length]), options, &range))
+            if (CFStringFindWithOptions((__bridge CFStringRef)itemValue, 
(__bridge CFStringRef)stringValue, CFRangeMake(0, [itemValue length]), options, 
&range))
                 return matchReturnValue;
         }
         return NO == matchReturnValue;
@@ -363,8 +363,8 @@
             }
         }
         CFRange range;
-        CFIndex itemLength = CFStringGetLength((CFStringRef)itemValue);
-        Boolean foundString = CFStringFindWithOptions((CFStringRef)itemValue, 
(CFStringRef)value, CFRangeMake(0, itemLength), options, &range);
+        CFIndex itemLength = CFStringGetLength((__bridge 
CFStringRef)itemValue);
+        Boolean foundString = CFStringFindWithOptions((__bridge 
CFStringRef)itemValue, (__bridge CFStringRef)value, CFRangeMake(0, itemLength), 
options, &range);
         switch (comparison) {
             case BDSKContain:
             case BDSKStartWith:

Modified: trunk/bibdesk/BDSKDBLPGroupServer.m
===================================================================
--- trunk/bibdesk/BDSKDBLPGroupServer.m 2024-01-01 23:08:31 UTC (rev 28508)
+++ trunk/bibdesk/BDSKDBLPGroupServer.m 2024-01-01 23:50:39 UTC (rev 28509)
@@ -366,7 +366,7 @@
             CFStringEncoding cfEncoding = kCFStringEncodingInvalidId;
             NSStringEncoding nsEncoding = NSUTF8StringEncoding;
             if (encodingName != nil)
-                cfEncoding = 
CFStringConvertIANACharSetNameToEncoding((CFStringRef)encodingName);
+                cfEncoding = 
CFStringConvertIANACharSetNameToEncoding((__bridge CFStringRef)encodingName);
             if (cfEncoding != kCFStringEncodingInvalidId)
                 nsEncoding = 
CFStringConvertEncodingToNSStringEncoding(cfEncoding);
             NSString *btString = [[[NSString alloc] initWithData:data 
encoding:nsEncoding] autorelease];

Modified: trunk/bibdesk/BDSKScriptGroup.m
===================================================================
--- trunk/bibdesk/BDSKScriptGroup.m     2024-01-01 23:08:31 UTC (rev 28508)
+++ trunk/bibdesk/BDSKScriptGroup.m     2024-01-01 23:50:39 UTC (rev 28509)
@@ -340,7 +340,7 @@
         
         // handle the source in this mode immediately
         // any nonzero timeout should be sufficient, since the task has 
completed and flushed the pipe
-        ret = CFRunLoopRunInMode((CFStringRef)BDSKScriptGroupRunLoopMode, 0.1, 
FALSE);
+        ret = CFRunLoopRunInMode((__bridge 
CFStringRef)BDSKScriptGroupRunLoopMode, 0.1, FALSE);
         
         // should get this immediately
         if (kCFRunLoopRunFinished == ret || kCFRunLoopRunStopped == ret) {

Modified: trunk/bibdesk/BDSKServerInfo.m
===================================================================
--- trunk/bibdesk/BDSKServerInfo.m      2024-01-01 23:08:31 UTC (rev 28508)
+++ trunk/bibdesk/BDSKServerInfo.m      2024-01-01 23:50:39 UTC (rev 28509)
@@ -551,7 +551,7 @@
 - (BOOL)validateResultEncoding:(id *)value error:(NSError **)error {
     BOOL isValid = NO;
     if (*value) {
-        CFStringRef charsetName = (CFStringRef)*value;
+        CFStringRef charsetName = (__bridge CFStringRef)*value;
         CFStringEncoding enc = 
CFStringConvertIANACharSetNameToEncoding(charsetName);
         isValid = enc != kCFStringEncodingInvalidId;
         

Modified: trunk/bibdesk/BDSKWebGroup.m
===================================================================
--- trunk/bibdesk/BDSKWebGroup.m        2024-01-01 23:08:31 UTC (rev 28508)
+++ trunk/bibdesk/BDSKWebGroup.m        2024-01-01 23:50:39 UTC (rev 28509)
@@ -270,7 +270,7 @@
                 NSString *encodingName = [dataSource textEncodingName];
                 NSStringEncoding encoding = NSUTF8StringEncoding;
                 if (nil != encodingName)
-                    encoding = 
CFStringConvertEncodingToNSStringEncoding(CFStringConvertIANACharSetNameToEncoding((CFStringRef)encodingName));
+                    encoding = 
CFStringConvertEncodingToNSStringEncoding(CFStringConvertIANACharSetNameToEncoding((__bridge
 CFStringRef)encodingName));
                 if (encoding != kCFStringEncodingInvalidId)
                     string = [[NSString alloc] initWithData:data 
encoding:encoding];
                 if (nil == string && encoding != NSUTF8StringEncoding)

Modified: trunk/bibdesk/BibAuthor.m
===================================================================
--- trunk/bibdesk/BibAuthor.m   2024-01-01 23:08:31 UTC (rev 28508)
+++ trunk/bibdesk/BibAuthor.m   2024-01-01 23:50:39 UTC (rev 28509)
@@ -235,7 +235,7 @@
     BDSKASSERT([otherAuth isKindOfClass:[self class]]); 
         
     // check to see if last names match; if not, we can return immediately
-    if(CFStringCompare((CFStringRef)fuzzyName, 
(CFStringRef)otherAuth->fuzzyName, 
kCFCompareCaseInsensitive|kCFCompareLocalized) != kCFCompareEqualTo)
+    if(CFStringCompare((__bridge CFStringRef)fuzzyName, (__bridge 
CFStringRef)otherAuth->fuzzyName, 
kCFCompareCaseInsensitive|kCFCompareLocalized) != kCFCompareEqualTo)
         return NO;
     
     // if one of the first names is empty, no point in doing anything more 
sophisticated (unless we want to force the order here)
@@ -242,7 +242,7 @@
     if(firstName == nil && [otherAuth firstName] == nil)
         return YES;
     else 
-        return __BibAuthorsHaveEqualFirstNames((CFArrayRef)firstNames, 
(CFArrayRef)otherAuth->firstNames);
+        return __BibAuthorsHaveEqualFirstNames((__bridge 
CFArrayRef)firstNames, (__bridge CFArrayRef)otherAuth->firstNames);
 }
 
 - (NSUInteger)fuzzyHash{
@@ -467,7 +467,7 @@
     // components of the first name used in fuzzy comparisons
     
     // @@ see note on firstLetterCharacterString() function for possible 
issues with this
-    firstNames = firstName ? 
(id)BDStringCreateComponentsSeparatedByCharacterSetTrimWhitespace(CFAllocatorGetDefault(),
 (CFStringRef)[firstName stringByDeTeXifyingString], separatorSet, FALSE) : 
[[NSArray alloc] init];
+    firstNames = firstName ? 
(id)BDStringCreateComponentsSeparatedByCharacterSetTrimWhitespace(CFAllocatorGetDefault(),
 (__bridge CFStringRef)[firstName stringByDeTeXifyingString], separatorSet, 
FALSE) : [[NSArray alloc] init];
 
     // fuzzy comparison  name
     // don't bother with spaces for this comparison (and whitespace is already 
collapsed)
@@ -520,7 +520,7 @@
     BDSKASSERT(abbreviatedNormalizedName == nil);
     BDSKASSERT(unpunctuatedAbbreviatedNormalizedName == nil);
     
-    CFArrayRef theFirstNames = (CFArrayRef)firstNames;
+    CFArrayRef theFirstNames = (__bridge CFArrayRef)firstNames;
     CFIndex idx, firstNameCount = CFArrayGetCount(theFirstNames);
     
     CFAllocatorRef alloc = CFAllocatorGetDefault();
@@ -551,12 +551,12 @@
         CFStringAppend(abbrevName, CFSTR(" "));
     }
     
-    CFStringAppend(abbrevName, (CFStringRef)fullLastName);
+    CFStringAppend(abbrevName, (__bridge CFStringRef)fullLastName);
     
-    abbreviatedName = [(NSString *)abbrevName copy];
+    abbreviatedName = [(__bridge NSString *)abbrevName copy];
     
     // now for the normalized abbreviated form; start with only the last name
-    CFStringReplaceAll(abbrevName, (CFStringRef)fullLastName);
+    CFStringReplaceAll(abbrevName, (__bridge CFStringRef)fullLastName);
     
     if(firstName){
         CFStringAppend(abbrevName, CFSTR(", "));
@@ -566,18 +566,18 @@
         CFRelease(abbrevFirstName);
     }
     
-    abbreviatedNormalizedName = [(NSString *)abbrevName copy];
+    abbreviatedNormalizedName = [(__bridge NSString *)abbrevName copy];
     
     // now for the unpunctuated normalized abbreviated form
     CFStringReplaceAll(abbrevName, CFSTR(""));
     
     if(vonPart){
-        CFStringAppend(abbrevName, (CFStringRef)vonPart);
+        CFStringAppend(abbrevName, (__bridge CFStringRef)vonPart);
         CFStringAppend(abbrevName, CFSTR(" "));
     }
     
     if (lastName){
-        CFStringAppend(abbrevName, (CFStringRef)lastName);
+        CFStringAppend(abbrevName, (__bridge CFStringRef)lastName);
     }
     
     if(firstName){
@@ -590,10 +590,10 @@
     
     if(jrPart){
         CFStringAppend(abbrevName, CFSTR(" "));
-        CFStringAppend(abbrevName, (CFStringRef)jrPart);
+        CFStringAppend(abbrevName, (__bridge CFStringRef)jrPart);
     }
     
-    unpunctuatedAbbreviatedNormalizedName = [(NSString *)abbrevName copy];
+    unpunctuatedAbbreviatedNormalizedName = [(__bridge NSString *)abbrevName 
copy];
     CFRelease(abbrevName);
 }
 

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