Revision: 28508
http://sourceforge.net/p/bibdesk/svn/28508
Author: hofman
Date: 2024-01-01 23:08:31 +0000 (Mon, 01 Jan 2024)
Log Message:
-----------
use some objc instead of CF
Modified Paths:
--------------
trunk/bibdesk/BDSKComplexString.m
Modified: trunk/bibdesk/BDSKComplexString.m
===================================================================
--- trunk/bibdesk/BDSKComplexString.m 2024-01-01 22:41:28 UTC (rev 28507)
+++ trunk/bibdesk/BDSKComplexString.m 2024-01-01 23:08:31 UTC (rev 28508)
@@ -35,7 +35,6 @@
#import "BDSKComplexString.h"
#import "NSString_BDSKExtensions.h"
-#import "CFString_BDSKExtensions.h"
#import "BDSKStringNode.h"
#import "BDSKMacroResolver.h"
#import "NSError_BDSKExtensions.h"
@@ -81,24 +80,24 @@
return [[(BDSKStringNode *)[nodes objectAtIndex:0] value] copy];
// Resizing can be a performance hit, but we can't safely use a fixed-size
mutable string
- CFMutableStringRef mutStr = CFStringCreateMutable(CFAllocatorGetDefault(),
0);
- CFStringRef nodeVal, expandedValue;
+ NSMutableString *mutStr = [[NSMutableString alloc] init];
+ NSString *nodeVal, *expandedValue;
for (BDSKStringNode *node in nodes) {
- nodeVal = (CFStringRef)(node->value);
+ nodeVal = node->value;
if(node->type == BDSKStringNodeMacro){
- expandedValue = (CFStringRef)[macroResolver valueOfMacro:(NSString
*)nodeVal];
+ expandedValue = [macroResolver valueOfMacro:nodeVal];
if(expandedValue == nil && macroResolver != [BDSKMacroResolver
defaultMacroResolver])
- expandedValue = (CFStringRef)[[BDSKMacroResolver
defaultMacroResolver] valueOfMacro:(NSString *)nodeVal];
+ expandedValue = [[BDSKMacroResolver defaultMacroResolver]
valueOfMacro:nodeVal];
if(expandedValue)
nodeVal = expandedValue;
}
- CFStringAppend(mutStr, nodeVal);
+ [mutStr appendString:nodeVal];
}
- BDSKPOSTCONDITION(!BDIsEmptyString(mutStr));
+ BDSKPOSTCONDITION(0 != [mutStr length]);
- return (NSString *)mutStr;
+ return mutStr;
}
static inline
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