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

Unified Diff: base/win/pe_image.h

Issue 895853003: Update from https://crrev.com/314320 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « base/threading/worker_pool_win.cc ('k') | base/win/registry.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/win/pe_image.h
diff --git a/base/win/pe_image.h b/base/win/pe_image.h
index d93e99dc14393b1f782d3752c3bbeba2accbef71..dde1b4876648df9c3646afca18760acc1d155f9d 100644
--- a/base/win/pe_image.h
+++ b/base/win/pe_image.h
@@ -239,15 +239,11 @@ class PEImageAsData : public PEImage {
};
inline bool PEImage::IsOrdinal(LPCSTR name) {
-#pragma warning(push)
-#pragma warning(disable: 4311)
- // This cast generates a warning because it is 32 bit specific.
- return reinterpret_cast<DWORD>(name) <= 0xFFFF;
-#pragma warning(pop)
+ return reinterpret_cast<uintptr_t>(name) <= 0xFFFF;
}
inline WORD PEImage::ToOrdinal(LPCSTR name) {
- return reinterpret_cast<WORD>(name);
+ return static_cast<WORD>(reinterpret_cast<intptr_t>(name));
}
inline HMODULE PEImage::module() const {
« no previous file with comments | « base/threading/worker_pool_win.cc ('k') | base/win/registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698