aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore/core/src/firebase/firestore/model/timestamp.h
diff options
context:
space:
mode:
authorGravatar Gil <mcg@google.com>2018-01-28 16:40:53 -0800
committerGravatar zxu <zxu@google.com>2018-01-28 19:40:53 -0500
commit63a380ba33b59b571d7abd7b4565b5e63eb4680d (patch)
tree1453fb4e2f561492d13a3f03060131b9a9b857aa /Firestore/core/src/firebase/firestore/model/timestamp.h
parent6dc13731f6510ccb476a95f3af52c3f62763ef6a (diff)
Use fixed-sized types (#719)
Should have caught this during review, but cpplint caught it
Diffstat (limited to 'Firestore/core/src/firebase/firestore/model/timestamp.h')
-rw-r--r--Firestore/core/src/firebase/firestore/model/timestamp.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/Firestore/core/src/firebase/firestore/model/timestamp.h b/Firestore/core/src/firebase/firestore/model/timestamp.h
index 3ffee48..dd0349c 100644
--- a/Firestore/core/src/firebase/firestore/model/timestamp.h
+++ b/Firestore/core/src/firebase/firestore/model/timestamp.h
@@ -43,22 +43,22 @@ class Timestamp {
* @param seconds the number of seconds since epoch.
* @param nanos the number of nanoseconds after the seconds.
*/
- Timestamp(long seconds, int nanos);
+ Timestamp(int64_t seconds, int32_t nanos);
/** Returns a timestamp with the current date / time. */
static Timestamp Now();
- long seconds() const {
+ int64_t seconds() const {
return seconds_;
}
- int nanos() const {
+ int32_t nanos() const {
return nanos_;
}
private:
- long seconds_;
- int nanos_;
+ int64_t seconds_;
+ int32_t nanos_;
};
/** Compares against another Timestamp. */
@@ -91,4 +91,4 @@ inline bool operator==(const Timestamp& lhs, const Timestamp& rhs) {
} // namespace firestore
} // namespace firebase
-#endif // FIRESTORE_CORE_SRC_FIREBASE_FIRESTORE_MODEL_FIELD_VALUE_H_
+#endif // FIRESTORE_CORE_SRC_FIREBASE_FIRESTORE_MODEL_TIMESTAMP_H_