Skip to content

Commit a5a2419

Browse files
committed
Review feedback
1 parent 0216b55 commit a5a2419

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

Core/GameEngine/Source/Common/System/MiniDumper.cpp

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -423,14 +423,18 @@ void MiniDumper::CreateMiniDump(DumpType dumpType)
423423
callbackInfoPtr = &callBackInfo;
424424
}
425425

426-
int dumpTypeFlags = MiniDumpWithIndirectlyReferencedMemory | MiniDumpScanMemory;
427-
if (dumpType != DUMP_TYPE_MINIMAL)
426+
int dumpTypeFlags = MiniDumpNormal;
427+
switch (dumpType)
428428
{
429+
case DUMP_TYPE_FULL:
430+
dumpTypeFlags |= MiniDumpWithFullMemory;
431+
FALLTHROUGH;
432+
case DUMP_TYPE_GAMEMEMORY:
429433
dumpTypeFlags |= MiniDumpWithDataSegs | MiniDumpWithHandleData | MiniDumpWithThreadInfo | MiniDumpWithFullMemoryInfo;
430-
if (dumpType == DUMP_TYPE_FULL)
431-
{
432-
dumpTypeFlags |= MiniDumpWithFullMemory;
433-
}
434+
FALLTHROUGH;
435+
case DUMP_TYPE_MINIMAL:
436+
dumpTypeFlags |= MiniDumpWithIndirectlyReferencedMemory | MiniDumpScanMemory;
437+
break;
434438
}
435439

436440
MINIDUMP_TYPE miniDumpType = static_cast<MINIDUMP_TYPE>(dumpTypeFlags);
@@ -482,7 +486,7 @@ BOOL MiniDumper::CallbackInternal(const MINIDUMP_CALLBACK_INPUT& input, MINIDUMP
482486
// Only include data segments for the game and ntdll modules to keep dump size low
483487
if (output.ModuleWriteFlags & ModuleWriteDataSeg)
484488
{
485-
if (::StrCmpIW(input.Module.FullPath, m_executablePath) != 0 && !::StrStrIW(input.Module.FullPath, L"ntdll.dll"))
489+
if (!::StrCmpIW(input.Module.FullPath, m_executablePath) && !::StrStrIW(input.Module.FullPath, L"ntdll.dll"))
486490
{
487491
// Exclude data segments for the module
488492
output.ModuleWriteFlags &= (~ModuleWriteDataSeg);

0 commit comments

Comments
 (0)