From 4e1ffe464900a45915a3a0a4f2a331b5824c24df Mon Sep 17 00:00:00 2001 From: zxu Date: Tue, 1 May 2018 13:37:53 -0400 Subject: Port `SnapshotVersion` for the rest Firestore modulo (#1185) * remove conversions in `Local` and `Remote` * replace `FSTSnapshotVersion` in `Model` * replace `FSTSnapshotVersion` in the rest * let test check equal with C++ equal * fix newly added code * address changes --- Firestore/Source/Local/FSTLocalStore.mm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Firestore/Source/Local/FSTLocalStore.mm') diff --git a/Firestore/Source/Local/FSTLocalStore.mm b/Firestore/Source/Local/FSTLocalStore.mm index a3c447f..3a324cd 100644 --- a/Firestore/Source/Local/FSTLocalStore.mm +++ b/Firestore/Source/Local/FSTLocalStore.mm @@ -318,8 +318,9 @@ NS_ASSUME_NONNULL_BEGIN } else { FSTLog( @"FSTLocalStore Ignoring outdated watch update for %s. " - "Current version: %@ Watch version: %@", - key.ToString().c_str(), existingDoc.version, doc.version); + "Current version: %s Watch version: %s", + key.ToString().c_str(), existingDoc.version.timestamp().ToString().c_str(), + doc.version.timestamp().ToString().c_str()); } // The document might be garbage because it was unreferenced by everything. @@ -331,8 +332,7 @@ NS_ASSUME_NONNULL_BEGIN // events when we get permission denied errors while trying to resolve the state of a locally // cached document that is in limbo. const SnapshotVersion &lastRemoteVersion = [self.queryCache lastRemoteSnapshotVersion]; - // TODO(zxu): convert to reference once SnapshotVersion is used in RemoteEvent. - const SnapshotVersion remoteVersion = remoteEvent.snapshotVersion; + const SnapshotVersion &remoteVersion = remoteEvent.snapshotVersion; if (remoteVersion != SnapshotVersion::None()) { FSTAssert(remoteVersion >= lastRemoteVersion, @"Watch stream reverted to previous snapshot?? (%s < %s)", -- cgit v1.2.3