mirror of
https://github.com/leozide/leocad
synced 2024-11-17 07:47:55 +01:00
Fixed compiler warnings.
This commit is contained in:
parent
58957440cf
commit
b698686420
2 changed files with 7 additions and 7 deletions
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue