Protect "std::max", "std::min" against MACROs defined in WinDef.h.

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@780 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
SiyangXie@gmail.com 2011-03-11 22:47:07 +00:00
parent fd18beeb5c
commit 88fa7cfc6b

View file

@ -794,10 +794,10 @@ bool ExceptionHandler::WriteMinidumpWithException(
// boundaries of the memory region.
const ULONG64 kIPMemorySize = 256;
context.memory_base =
std::max(reinterpret_cast<ULONG64>(info.BaseAddress),
(std::max)(reinterpret_cast<ULONG64>(info.BaseAddress),
instruction_pointer - (kIPMemorySize / 2));
ULONG64 end_of_range =
std::min(instruction_pointer + (kIPMemorySize / 2),
(std::min)(instruction_pointer + (kIPMemorySize / 2),
reinterpret_cast<ULONG64>(info.BaseAddress)
+ info.RegionSize);
context.memory_size =