aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore/core/src
diff options
context:
space:
mode:
authorGravatar Gil <mcg@google.com>2018-05-09 15:04:50 -0700
committerGravatar GitHub <noreply@github.com>2018-05-09 15:04:50 -0700
commitfb6f930f7beea29129cea89896d8ab874316ecbe (patch)
tree60d812be75743e9e4c8e00404282d1d8f7b10f35 /Firestore/core/src
parent6a97d15413d378754c1ef71e1a5c9f5b4b4262ea (diff)
Remove final vestiges of FSTSnapshotVersion (#1253)
Diffstat (limited to 'Firestore/core/src')
-rw-r--r--Firestore/core/src/firebase/firestore/model/snapshot_version.h33
1 files changed, 9 insertions, 24 deletions
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>{}(timestamp_);
}
-#endif // defined(__OBJC__)
+#endif // __OBJC__
private:
Timestamp timestamp_;