Fixed compiler warnings.

This commit is contained in:
Leonardo Zide 2020-01-18 16:53:33 -08:00
parent 58957440cf
commit b698686420
2 changed files with 7 additions and 7 deletions

View file

@ -370,7 +370,7 @@ void lcPartSelectionListModel::PartLoaded(PieceInfo* Info)
{
if (mParts[PartIdx].first == Info)
{
auto PreviewIt = std::find(mRequestedPreviews.begin(), mRequestedPreviews.end(), PartIdx);
auto PreviewIt = std::find(mRequestedPreviews.begin(), mRequestedPreviews.end(), static_cast<int>(PartIdx));
if (PreviewIt != mRequestedPreviews.end())
{
mRequestedPreviews.erase(PreviewIt);

View file

@ -82,20 +82,20 @@ void lcScene::AddMesh(lcMesh* Mesh, const lcMatrix44& WorldMatrix, int ColorInde
if ((Section->PrimitiveType & (LC_MESH_TRIANGLES | LC_MESH_TEXTURED_TRIANGLES)) == 0)
continue;
int ColorIndex = Section->ColorIndex;
int SectionColorIndex = Section->ColorIndex;
if (ColorIndex == gDefaultColor)
ColorIndex = RenderMesh.ColorIndex;
if (SectionColorIndex == gDefaultColor)
SectionColorIndex = RenderMesh.ColorIndex;
if (!lcIsColorTranslucent(ColorIndex))
if (!lcIsColorTranslucent(SectionColorIndex))
continue;
lcVector3 Center = (Section->BoundingBox.Min + Section->BoundingBox.Max) / 2;
float Distance = fabsf(lcMul31(lcMul31(Center, WorldMatrix), mViewMatrix).z);
float InstanceDistance = fabsf(lcMul31(lcMul31(Center, WorldMatrix), mViewMatrix).z);
lcTranslucentMeshInstance& Instance = mTranslucentMeshes.Add();
Instance.Section = Section;
Instance.Distance = Distance;
Instance.Distance = InstanceDistance;
Instance.RenderMeshIndex = mRenderMeshes.GetSize() - 1;
}
}