Skip to content

Commit e2650fe

Browse files
authored
Fix Xcode warnings (#24781)
1 parent 0d60511 commit e2650fe

5 files changed

Lines changed: 3 additions & 7 deletions

File tree

Sources/WordPressData/Objective-C/include/Blog.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,6 @@ typedef NS_ENUM(NSInteger, SiteVisibility) {
229229
// wp.koke.me
230230
@property (weak, readonly, nullable) NSString *hostname;
231231

232-
@property (weak, readonly, nullable) NSString *defaultPostFormatText;
233232
// Used to check if the blog has an icon set up
234233
@property (readonly) BOOL hasIcon;
235234

Sources/WordPressData/Swift/Post.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,7 @@ public class Post: AbstractPost {
7777

7878
for categoryName in categoryNames {
7979

80-
assert(blog.categories is Set<PostCategory>)
81-
guard let blogCategories = blog.categories as? Set<PostCategory> else {
82-
DDLogError("Expected blog.categories to be \(String(describing: Set<PostCategory>.self)).")
80+
guard let blogCategories = blog.categories else {
8381
return
8482
}
8583

WordPress/Classes/Utility/Blogging Reminders/BloggingRemindersStore.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ class BloggingRemindersStore {
7777
self.init(fileManager: fileManager, configuration: configuration, dataFileURL: url)
7878
} catch {
7979
throw Error.configurationDecodingFailed(error: error)
80-
self.init(fileManager: fileManager, configuration: [:], dataFileURL: url)
8180
}
8281
}
8382

WordPress/Classes/ViewRelated/Blog/Blog Dashboard/Cards/DashboardJetpackSocialCardCell.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ private extension DashboardJetpackSocialCardCell {
269269
static func showNoSharesView(for blog: Blog) -> Bool {
270270
guard let sharingLimit = blog.sharingLimit,
271271
let dotComID = blog.dotComID?.stringValue,
272-
let connections = blog.connections as? Set<PublicizeConnection> else {
272+
let connections = blog.connections else {
273273
return false
274274
}
275275
let repository = UserPersistentStoreFactory.instance()

WordPress/Classes/ViewRelated/People/Controllers/PersonViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ final class PersonViewController: UITableViewController {
157157
return
158158
}
159159

160-
roleViewController.roles = blog.sortedRoles.map({ $0.toUnmanaged() }) ?? []
160+
roleViewController.roles = blog.sortedRoles.map({ $0.toUnmanaged() })
161161
roleViewController.selectedRole = person.role
162162
roleViewController.onChange = { [weak self] newRole in
163163
self?.updateUserRole(newRole)

0 commit comments

Comments
 (0)