Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Unified Diff: third_party/protobuf/src/google/protobuf/util/time_util.cc

Issue 2599263002: third_party/protobuf: Update to HEAD (f52e188fe4) (Closed)
Patch Set: Address comments Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/protobuf/src/google/protobuf/util/time_util.cc
diff --git a/third_party/protobuf/src/google/protobuf/util/time_util.cc b/third_party/protobuf/src/google/protobuf/util/time_util.cc
index c782d691a874bbf075fabba91d431cc84e925ff4..b11f822ad9cecfe655eebfb4fe141feace685a6b 100644
--- a/third_party/protobuf/src/google/protobuf/util/time_util.cc
+++ b/third_party/protobuf/src/google/protobuf/util/time_util.cc
@@ -142,6 +142,15 @@ int64 RoundTowardZero(int64 value, int64 divider) {
}
} // namespace
+// Actually define these static const integers. Required by C++ standard (but
+// some compilers don't like it).
+#ifndef _MSC_VER
+const int64 TimeUtil::kTimestampMinSeconds;
+const int64 TimeUtil::kTimestampMaxSeconds;
+const int64 TimeUtil::kDurationMaxSeconds;
+const int64 TimeUtil::kDurationMinSeconds;
+#endif // !_MSC_VER
+
string TimeUtil::ToString(const Timestamp& timestamp) {
return FormatTime(timestamp.seconds(), timestamp.nanos());
}
@@ -174,7 +183,7 @@ string TimeUtil::ToString(const Duration& duration) {
seconds = -seconds;
nanos = -nanos;
}
- result += StringPrintf("%" GOOGLE_LL_FORMAT "d", seconds);
+ result += SimpleItoa(seconds);
if (nanos != 0) {
result += "." + FormatNanos(nanos);
}

Powered by Google App Engine
This is Rietveld 408576698