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

Unified Diff: third_party/base/stl_util.h

Issue 2484953003: Force compiler to deduce src type for checked_cast<dst, src>. (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 | « fpdfsdk/fpdfview.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/base/stl_util.h
diff --git a/third_party/base/stl_util.h b/third_party/base/stl_util.h
index 0bf442c316c6ae71cb8ddf574d0c02d315f8a82b..795414b59f021543e904394efcd693985bf3b392 100644
--- a/third_party/base/stl_util.h
+++ b/third_party/base/stl_util.h
@@ -41,7 +41,7 @@ class FakeUniquePtr : public std::unique_ptr<T> {
// size_t size() method return values will be checked.
template <typename ResultType, typename Collection>
ResultType CollectionSize(const Collection& collection) {
- return pdfium::base::checked_cast<ResultType, size_t>(collection.size());
+ return pdfium::base::checked_cast<ResultType>(collection.size());
}
// Track the addition of an object to a set, removing it automatically when
« no previous file with comments | « fpdfsdk/fpdfview.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698