Skip to content

Commit bae55d1

Browse files
committed
clang fix
1 parent 4611603 commit bae55d1

File tree

2 files changed

+11
-17
lines changed

2 files changed

+11
-17
lines changed

Client/game_sa/CRenderWareSA.TextureReplacing.cpp

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2431,8 +2431,7 @@ namespace
24312431
auto* slot = pTxdPoolSA->GetTextureDictonarySlot(existingTxdId);
24322432
// Also accept usParentIndex==0xFFFF: the slot was created with the same parent
24332433
// but the parent TXD wasn't loaded yet, so parent-chain setup is still pending.
2434-
if (slot && slot->rwTexDictonary &&
2435-
(slot->usParentIndex == usParentTxdId || slot->usParentIndex == static_cast<unsigned short>(-1)))
2434+
if (slot && slot->rwTexDictonary && (slot->usParentIndex == usParentTxdId || slot->usParentIndex == static_cast<unsigned short>(-1)))
24362435
{
24372436
g_IsolatedModelByTxd[existingTxdId] = usModelId;
24382437
if (pModelInfo->GetTextureDictionaryID() != existingTxdId)
@@ -2746,8 +2745,7 @@ void CRenderWareSA::ProcessPendingIsolatedModels()
27462745
// functioning parent chain; clear them regardless of whether the child TXD is live.
27472746
const auto* pTimeoutChildSlot = pTxdPoolSA->GetTextureDictonarySlot(childTxdId);
27482747
const bool bIsIncompleteVanillaSlot =
2749-
pModelInfo->GetParentID() == 0 && pTimeoutChildSlot &&
2750-
pTimeoutChildSlot->usParentIndex == static_cast<unsigned short>(-1);
2748+
pModelInfo->GetParentID() == 0 && pTimeoutChildSlot && pTimeoutChildSlot->usParentIndex == static_cast<unsigned short>(-1);
27512749
if (!bIsIncompleteVanillaSlot && pModelInfo->GetTextureDictionaryID() == childTxdId && CTxdStore_GetTxd(childTxdId) != nullptr)
27522750
continue;
27532751

@@ -2770,11 +2768,9 @@ void CRenderWareSA::ProcessPendingIsolatedModels()
27702768
// GetParentID()==0: vanilla model owns its TXD directly (no clone parent).
27712769
// AllocateIsolatedTxdForVanillaModel stores usParentIndex=0xFFFF when the parent
27722770
// TXD is not yet loaded; detect that state and complete setup here once it arrives.
2773-
auto* pChildSlot = pTxdPoolSA->GetTextureDictonarySlot(childTxdId);
2774-
const bool bIsDeferredVanillaSetup =
2775-
pChildSlot && pChildSlot->rwTexDictonary &&
2776-
pChildSlot->usParentIndex == static_cast<unsigned short>(-1) &&
2777-
pModelInfo->GetTextureDictionaryID() == childTxdId;
2771+
auto* pChildSlot = pTxdPoolSA->GetTextureDictonarySlot(childTxdId);
2772+
const bool bIsDeferredVanillaSetup = pChildSlot && pChildSlot->rwTexDictonary && pChildSlot->usParentIndex == static_cast<unsigned short>(-1) &&
2773+
pModelInfo->GetTextureDictionaryID() == childTxdId;
27782774

27792775
if (bIsDeferredVanillaSetup)
27802776
{

Client/loader/MainFunctions.cpp

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,8 @@ static DWORD RunDebuggerLoop(HANDLE hProcess, DWORD processId, DebuggerCrashCapt
253253
// These are deliberate security fastfails.
254254
if (!IsNetcModule(capture.moduleInfo.moduleName))
255255
{
256-
WriteFailFastDump(hProcess, processId, debugEvent.dwThreadId, &debugEvent.u.Exception.ExceptionRecord, &capture.threadContext,
257-
capture);
256+
WriteFailFastDump(hProcess, processId, debugEvent.dwThreadId, &debugEvent.u.Exception.ExceptionRecord,
257+
&capture.threadContext, capture);
258258
}
259259
else
260260
{
@@ -2110,8 +2110,7 @@ int LaunchGame(SString strCmdLine)
21102110
"MTA: San Andreas has been terminated due to an integrity violation.\n\n"
21112111
"Make sure that no external program is modifying the game. Note that some unreliable "
21122112
"AV's (such as Bitdefender) are known to interfere in a way that can lead to this problem.",
2113-
"MTA: San Andreas",
2114-
MB_OK | MB_ICONWARNING | MB_TOPMOST);
2113+
"MTA: San Andreas", MB_OK | MB_ICONWARNING | MB_TOPMOST);
21152114
}
21162115
else
21172116
{
@@ -2138,17 +2137,16 @@ int LaunchGame(SString strCmdLine)
21382137
if (werInfo.found && IsFailFastException(werInfo.exceptionCode) && IsNetcModule(werInfo.moduleName))
21392138
{
21402139
isAcDefense = true;
2141-
AddReportLog(7210, SString("Loader - AC integrity exit detected via WER (module=%s code=0x%08X)",
2142-
werInfo.moduleName.c_str(), static_cast<unsigned int>(werInfo.exceptionCode)));
2140+
AddReportLog(7210, SString("Loader - AC integrity exit detected via WER (module=%s code=0x%08X)", werInfo.moduleName.c_str(),
2141+
static_cast<unsigned int>(werInfo.exceptionCode)));
21432142
// Mark WER report as handled so _CheckForWerCrash does not reprocess it on next launch
21442143
if (!werInfo.reportId.empty())
21452144
SetApplicationSetting("diagnostics", "last-wer-report-shown", werInfo.reportId);
21462145
MessageBoxUTF8(nullptr,
21472146
"MTA: San Andreas has been terminated due to an AC integrity violation.\n\n"
21482147
"Make sure that no external program is modifying the game. Note that some unreliable "
21492148
"AV's (such as Bitdefender) are known to interfere in a way that can lead to this problem.",
2150-
"MTA: San Andreas",
2151-
MB_OK | MB_ICONWARNING | MB_TOPMOST);
2149+
"MTA: San Andreas", MB_OK | MB_ICONWARNING | MB_TOPMOST);
21522150
}
21532151
else if (werInfo.found)
21542152
{

0 commit comments

Comments
 (0)