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

Unified Diff: pdf/pdfium/pdfium_api_string_buffer_adapter.h

Issue 2543443003: Fix pdfium use of base/numerics (Closed)
Patch Set: Created 4 years, 1 month 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: pdf/pdfium/pdfium_api_string_buffer_adapter.h
diff --git a/pdf/pdfium/pdfium_api_string_buffer_adapter.h b/pdf/pdfium/pdfium_api_string_buffer_adapter.h
index 7b45cbe36a800f63a2b7acd5ed0600dc26509064..d3a413cd5a7f426a8617cd803aab2b1689b83cc5 100644
--- a/pdf/pdfium/pdfium_api_string_buffer_adapter.h
+++ b/pdf/pdfium/pdfium_api_string_buffer_adapter.h
@@ -42,8 +42,7 @@ class PDFiumAPIStringBufferAdapter {
template <typename IntType>
void Close(IntType actual_size) {
- base::CheckedNumeric<size_t> unsigned_size = actual_size;
- Close(unsigned_size.ValueOrDie());
+ Close(base::checked_cast<size_t>(actual_size));
}
private:
@@ -88,8 +87,7 @@ class PDFiumAPIStringBufferSizeInBytesAdapter {
template <typename IntType>
void Close(IntType actual_size) {
- base::CheckedNumeric<size_t> unsigned_size = actual_size;
- Close(unsigned_size.ValueOrDie());
+ Close(base::checked_cast<size_t>(actual_size));
}
private:
« 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