CMaterialSet/CModel: Make use of size_t where applicable

Prevents type truncation warnings internally and also provides slightly
better code-gen, given the upper half of 64-bit registers don't need to
be constantly cleared.
This commit is contained in:
Lioncash
2020-06-15 14:24:39 -04:00
parent 6edea6a225
commit 79f7b62960
10 changed files with 158 additions and 136 deletions

View File

@@ -53,9 +53,9 @@ void CGizmo::AddToRenderer(CRenderer *pRenderer, const SViewInfo&)
CModel *pModel = pPart->pModel;
// Determine whether to use the mat set for regular (0) or highlight (1)
FAxes PartAxes = pPart->ModelAxes;
bool IsHighlighted = (PartAxes != EAxis::None) && ((mSelectedAxes & PartAxes) == pPart->ModelAxes);
uint32 SetID = (IsHighlighted ? 1 : 0);
const FAxes PartAxes = pPart->ModelAxes;
const bool IsHighlighted = (PartAxes != EAxis::None) && ((mSelectedAxes & PartAxes) == pPart->ModelAxes);
const size_t SetID = (IsHighlighted ? 1 : 0);
// Add to renderer...
pRenderer->AddMesh(this, iPart, pModel->AABox().Transformed(mTransform), pModel->HasTransparency(SetID), ERenderCommand::DrawMesh, EDepthGroup::Foreground);