diff options
author | 2018-02-01 07:55:49 -0800 | |
---|---|---|
committer | 2018-02-01 07:55:49 -0800 | |
commit | 515625c47fab947f82d7f8fc8daef885e56a7df6 (patch) | |
tree | 2a0eea9158134c3dbaf950953a86e2841e101bfc /Firestore/third_party/Immutable/FSTTreeSortedDictionary.m | |
parent | ac3052223465ce654457fec17b34f27de1706e57 (diff) |
Remove predecessorKey,Object,Document, etc (#735)
This is dead code.
I think it was probably useful in the RTDB because of the way it notified of changes, but we give changes with indexes in Firestore so I think we don't need it.
Diffstat (limited to 'Firestore/third_party/Immutable/FSTTreeSortedDictionary.m')
-rw-r--r-- | Firestore/third_party/Immutable/FSTTreeSortedDictionary.m | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/Firestore/third_party/Immutable/FSTTreeSortedDictionary.m b/Firestore/third_party/Immutable/FSTTreeSortedDictionary.m index b3e691f..ec0c483 100644 --- a/Firestore/third_party/Immutable/FSTTreeSortedDictionary.m +++ b/Firestore/third_party/Immutable/FSTTreeSortedDictionary.m @@ -87,36 +87,6 @@ NS_ASSUME_NONNULL_BEGIN return nil; } -- (nullable id)predecessorKey:(id)key { - NSComparisonResult cmp; - id<FSTLLRBNode> node = self.root; - id<FSTLLRBNode> rightParent = nil; - while (![node isEmpty]) { - cmp = self.comparator(key, node.key); - if (cmp == NSOrderedSame) { - if (![node.left isEmpty]) { - node = node.left; - while (![node.right isEmpty]) { - node = node.right; - } - return node.key; - } else if (rightParent != nil) { - return rightParent.key; - } else { - return nil; - } - } else if (cmp == NSOrderedAscending) { - node = node.left; - } else if (cmp == NSOrderedDescending) { - rightParent = node; - node = node.right; - } - } - @throw [NSException exceptionWithName:@"NonexistentKey" - reason:@"getPredecessorKey called with nonexistent key." - userInfo:@{@"key" : [key description]}]; -} - - (NSUInteger)indexOfKey:(id)key { NSUInteger prunedNodes = 0; id<FSTLLRBNode> node = self.root; |