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

Unified Diff: base/time/time.cc

Issue 1988663002: Add: check exploded time is properly converted (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months 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: base/time/time.cc
diff --git a/base/time/time.cc b/base/time/time.cc
index 76ffeb744112d1909afa9b488bcfa277950225bb..fcb39eb6bd20e5b09eb8dae9c484f9089b3ab6bf 100644
--- a/base/time/time.cc
+++ b/base/time/time.cc
@@ -344,4 +344,11 @@ bool Time::Exploded::HasValidValues() const {
is_in_range(millisecond, 0, 999);
}
+bool Time::Exploded::operator!=(const Exploded& rhs) {
+ return year != rhs.year || month != rhs.month ||
+ day_of_month != rhs.day_of_month || hour != rhs.hour ||
+ minute != rhs.minute || second != rhs.second ||
+ millisecond != rhs.millisecond;
+}
+
} // namespace base

Powered by Google App Engine
This is Rietveld 408576698