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

Unified Diff: courgette/label_manager.cc

Issue 2534203003: Fix courgette use of base/numerics (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: courgette/label_manager.cc
diff --git a/courgette/label_manager.cc b/courgette/label_manager.cc
index 51e0d5de43c945bfb2f7aeb39222586d626b5ce5..c3846cc0e5c6c3ea53772bace35a0309c4d16002 100644
--- a/courgette/label_manager.cc
+++ b/courgette/label_manager.cc
@@ -177,8 +177,8 @@ void LabelManager::Read(RvaVisitor* rva_visitor) {
labels_.reserve(num_distinct_rva);
for (CRV it(rvas.begin(), rvas.end()); it.has_more(); it.advance()) {
labels_.push_back(Label(*it.cur()));
- base::CheckedNumeric<uint32_t> count = it.repeat();
- labels_.back().count_ = count.ValueOrDie();
+ labels_.back().count_ =
+ base::checked_cast<decltype(labels_.back().count_)>(it.repeat());
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698