Chromium Code Reviews| 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; |
|
grt (UTC plus 2)
2015/01/28 14:12:12
if you wanted intptr_t everywhere for the sake of
|
| } |
| 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 { |