clear warnings

This commit is contained in:
John Estropia
2020-11-11 13:18:11 +09:00
parent d6eae8c091
commit 63b3d25d78
11 changed files with 83 additions and 17 deletions

View File

@@ -1189,7 +1189,6 @@ extension NSAttributeDescription: CoreStoreDebugStringConvertible {
("versionHash", self.versionHash),
("versionHashModifier", self.versionHashModifier as Any),
("isIndexedBySpotlight", self.isIndexedBySpotlight),
("isStoredInExternalRecord", self.isStoredInExternalRecord),
("renamingIdentifier", self.renamingIdentifier as Any)
)
}
@@ -1363,11 +1362,9 @@ extension NSRelationshipDescription: CoreStoreDebugStringConvertible {
("isOptional", self.isOptional),
("isTransient", self.isTransient),
("userInfo", self.userInfo as Any),
("isIndexed", self.isIndexed),
("versionHash", self.versionHash),
("versionHashModifier", self.versionHashModifier as Any),
("isIndexedBySpotlight", self.isIndexedBySpotlight),
("isStoredInExternalRecord", self.isStoredInExternalRecord),
("renamingIdentifier", self.renamingIdentifier as Any)
)
}

View File

@@ -29,4 +29,4 @@
FOUNDATION_EXPORT double CoreStoreVersionNumber;
FOUNDATION_EXPORT const unsigned char CoreStoreVersionString[];
#import "CoreStoreBridge.h"
#import <CoreStore/CoreStoreBridge.h>

View File

@@ -597,20 +597,32 @@ public struct ListSnapshot<O: DynamicObject>: RandomAccessCollection, Hashable {
self.diffableSnapshot.reloadSections(sectionIDs)
}
// MARK: RandomAccessCollection
public var startIndex: Index {
return self.diffableSnapshot.itemIdentifiers.startIndex
return 0
}
public var endIndex: Index {
return self.diffableSnapshot.itemIdentifiers.endIndex
return self.diffableSnapshot.numberOfItems
}
// MARK: BidirectionalCollection
public func index(_ i: Int, offsetBy distance: Int) -> Int {
return i + distance
}
public func distance(from start: Int, to end: Int) -> Int {
return end - start
}
// MARK: Sequence