From fb6f930f7beea29129cea89896d8ab874316ecbe Mon Sep 17 00:00:00 2001 From: Gil Date: Wed, 9 May 2018 15:04:50 -0700 Subject: Remove final vestiges of FSTSnapshotVersion (#1253) --- .../firebase/firestore/model/snapshot_version.h | 33 ++++++---------------- 1 file changed, 9 insertions(+), 24 deletions(-) (limited to 'Firestore/core/src') diff --git a/Firestore/core/src/firebase/firestore/model/snapshot_version.h b/Firestore/core/src/firebase/firestore/model/snapshot_version.h index 7ce0985..dbecea1 100644 --- a/Firestore/core/src/firebase/firestore/model/snapshot_version.h +++ b/Firestore/core/src/firebase/firestore/model/snapshot_version.h @@ -19,11 +19,6 @@ #include "Firestore/core/include/firebase/firestore/timestamp.h" -#if defined(__OBJC__) -#import "FIRTimestamp.h" -#import "Firestore/Source/Core/FSTSnapshotVersion.h" -#endif // defined(__OBJC__) - namespace firebase { namespace firestore { namespace model { @@ -34,6 +29,11 @@ namespace model { */ class SnapshotVersion { public: +#if __OBJC__ + SnapshotVersion() { + } +#endif // __OBJC__ + explicit SnapshotVersion(const Timestamp& timestamp); const Timestamp& timestamp() const { @@ -43,26 +43,11 @@ class SnapshotVersion { /** Creates a new version that is smaller than all other versions. */ static const SnapshotVersion& None(); -#if defined(__OBJC__) - SnapshotVersion() { - } - - SnapshotVersion(FSTSnapshotVersion* version) // NOLINT(runtime/explicit) - : timestamp_{version.timestamp.seconds, version.timestamp.nanoseconds} { - } - - operator FSTSnapshotVersion*() const { - if (timestamp_ == Timestamp{}) { - return [FSTSnapshotVersion noVersion]; - } else { - return [FSTSnapshotVersion - versionWithTimestamp:[FIRTimestamp - timestampWithSeconds:timestamp_.seconds() - nanoseconds:timestamp_ - .nanoseconds()]]; - } +#if __OBJC__ + size_t Hash() const { + return std::hash{}(timestamp_); } -#endif // defined(__OBJC__) +#endif // __OBJC__ private: Timestamp timestamp_; -- cgit v1.2.3