Revision: 29004
          http://sourceforge.net/p/bibdesk/svn/29004
Author:   hofman
Date:     2025-02-16 15:39:09 +0000 (Sun, 16 Feb 2025)
Log Message:
-----------
don't return instancetype from initializzers of placeholder class

Modified Paths:
--------------
    trunk/bibdesk/BDSKBookmark.m
    trunk/bibdesk/BDSKLinkedFile.m
    trunk/bibdesk/BDSKSearchBookmark.m

Modified: trunk/bibdesk/BDSKBookmark.m
===================================================================
--- trunk/bibdesk/BDSKBookmark.m        2025-02-16 09:27:50 UTC (rev 29003)
+++ trunk/bibdesk/BDSKBookmark.m        2025-02-16 15:39:09 UTC (rev 29004)
@@ -179,27 +179,27 @@
 
 @implementation BDSKPlaceholderBookmark
 
-- (instancetype)init {
+- (id)init {
     return [self initWithURL:[NSURL URLWithString:@"https://";] name:nil];
 }
 
-- (instancetype)initWithURL:(NSURL *)aURL name:(NSString *)aName {
+- (id)initWithURL:(NSURL *)aURL name:(NSString *)aName {
     return (id)[[BDSKURLBookmark alloc] initWithURL:aURL name:aName ?: 
NSLocalizedString(@"New Boookmark", @"Default name for boookmark")];
 }
 
-- (instancetype)initFolderWithChildren:(NSArray *)aChildren name:(NSString 
*)aName {
+- (id)initFolderWithChildren:(NSArray *)aChildren name:(NSString *)aName {
     return (id)[[BDSKFolderBookmark alloc] initFolderWithChildren:aChildren 
name:aName];
 }
 
-- (instancetype)initFolderWithName:(NSString *)aName {
+- (id)initFolderWithName:(NSString *)aName {
     return [self initFolderWithChildren:@[] name:aName];
 }
 
-- (instancetype)initSeparator {
+- (id)initSeparator {
     return (id)[[BDSKSeparatorBookmark alloc] init];
 }
 
-- (instancetype)initRootWithChildrenDictionaries:(NSArray *)dictionaries {
+- (id)initRootWithChildrenDictionaries:(NSArray *)dictionaries {
     NSMutableArray *newChildren = [NSMutableArray array];
     BDSKBookmark *child;
     for (NSDictionary *dict in dictionaries) {
@@ -211,7 +211,7 @@
     return (id)[[BDSKRootBookmark alloc] initFolderWithChildren:newChildren 
name:NSLocalizedString(@"Bookmarks Menu", @"Menu item title")];
 }
 
-- (instancetype)initWithDictionary:(NSDictionary *)dictionary {
+- (id)initWithDictionary:(NSDictionary *)dictionary {
     if ([[dictionary objectForKey:TYPE_KEY] isEqualToString:FOLDER_STRING]) {
         NSMutableArray *newChildren = [NSMutableArray array];
         BDSKBookmark *child;

Modified: trunk/bibdesk/BDSKLinkedFile.m
===================================================================
--- trunk/bibdesk/BDSKLinkedFile.m      2025-02-16 09:27:50 UTC (rev 29003)
+++ trunk/bibdesk/BDSKLinkedFile.m      2025-02-16 15:39:09 UTC (rev 29004)
@@ -257,11 +257,11 @@
 
 @implementation BDSKPlaceholderLinkedFile
 
-- (instancetype)init {
+- (id)init {
     return nil;
 }
 
-- (instancetype)initWithURL:(NSURL *)aURL 
delegate:(id<BDSKLinkedFileDelegate>)aDelegate {
+- (id)initWithURL:(NSURL *)aURL delegate:(id<BDSKLinkedFileDelegate>)aDelegate 
{
     if([aURL isFileURL])
         return (id)[BDSKLinkedAliasFile_alloc initWithURL:aURL 
delegate:aDelegate];
     else if (aURL)
@@ -270,11 +270,11 @@
         return nil;
 }
 
-- (instancetype)initWithBase64String:(NSString *)base64String 
delegate:(id<BDSKLinkedFileDelegate>)aDelegate {
+- (id)initWithBase64String:(NSString *)base64String 
delegate:(id<BDSKLinkedFileDelegate>)aDelegate {
     return (id)[BDSKLinkedAliasFile_alloc initWithBase64String:base64String 
delegate:aDelegate];
 }
 
-- (instancetype)initWithURLString:(NSString *)aString {
+- (id)initWithURLString:(NSString *)aString {
     return (id)[[BDSKLinkedURL alloc] initWithURLString:aString];
 }
 

Modified: trunk/bibdesk/BDSKSearchBookmark.m
===================================================================
--- trunk/bibdesk/BDSKSearchBookmark.m  2025-02-16 09:27:50 UTC (rev 29003)
+++ trunk/bibdesk/BDSKSearchBookmark.m  2025-02-16 15:39:09 UTC (rev 29004)
@@ -179,19 +179,19 @@
 
 @implementation BDSKPlaceholderSearchBookmark
 
-- (instancetype)init {
+- (id)init {
     return nil;
 }
 
-- (instancetype)initFolderWithChildren:(NSArray *)aChildren label:(NSString 
*)aLabel {
+- (id)initFolderWithChildren:(NSArray *)aChildren label:(NSString *)aLabel {
     return [(id)[BDSKFolderSearchBookmark alloc] 
initFolderWithChildren:aChildren label:aLabel];
 }
 
-- (instancetype)initFolderWithLabel:(NSString *)aLabel {
+- (id)initFolderWithLabel:(NSString *)aLabel {
     return [self initFolderWithChildren:@[] label:aLabel];
 }
 
-- (instancetype)initRootWithChildrenDictionaries:(NSArray *)dictionaries {
+- (id)initRootWithChildrenDictionaries:(NSArray *)dictionaries {
     NSMutableArray *newChildren = [NSMutableArray array];
     BDSKSearchBookmark *child;
     for (NSDictionary *dict in dictionaries) {
@@ -203,15 +203,15 @@
     return (id)[[BDSKRootSearchBookmark alloc] 
initFolderWithChildren:newChildren label:NSLocalizedString(@"Searches Menu", 
@"Menu item title")];
 }
 
-- (instancetype)initSeparator {
+- (id)initSeparator {
     return (id)[[BDSKSeparatorSearchBookmark alloc] init];
 }
 
-- (instancetype)initWithInfo:(NSDictionary *)aDictionary label:(NSString 
*)aLabel {
+- (id)initWithInfo:(NSDictionary *)aDictionary label:(NSString *)aLabel {
     return (id)[[BDSKServerSearchBookmark alloc] initWithInfo:aDictionary 
label:aLabel];
 }
 
-- (instancetype)initWithDictionary:(NSDictionary *)dictionary {
+- (id)initWithDictionary:(NSDictionary *)dictionary {
     if ([[dictionary objectForKey:BOOKMARK_TYPE_KEY] 
isEqualToString:FOLDER_STRING]) {
         NSMutableArray *newChildren = [NSMutableArray array];
         BDSKSearchBookmark *child;

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