From d77ca7357f2d2a151ae3d0ecbb1f7fc0436b39b0 Mon Sep 17 00:00:00 2001 From: Leonardo Zide Date: Thu, 28 Dec 2023 11:42:28 -0800 Subject: [PATCH] Fixed warnings. --- common/light.cpp | 6 +----- common/project.cpp | 6 +++--- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/common/light.cpp b/common/light.cpp index 83319c7f..6eac8f00 100644 --- a/common/light.cpp +++ b/common/light.cpp @@ -32,16 +32,12 @@ lcLight::lcLight(const lcVector3& Position, lcLightType LightType) void lcLight::UpdateLightType() { - lcVector2 Size; + lcVector2 Size(0.0f, 0.0f); switch (mLightType) { case lcLightType::Point: - Size = lcVector2(0.0f, 0.0f); - break; - case lcLightType::Spot: - Size = lcVector2(0.0f, 0.0f); break; case lcLightType::Directional: diff --git a/common/project.cpp b/common/project.cpp index 56b8c528..882293b5 100644 --- a/common/project.cpp +++ b/common/project.cpp @@ -1847,7 +1847,7 @@ bool Project::ExportPOVRay(const QString& FileName) LGEO_COLOR_GLITTER = 0x40 }; - char Line[1024]; + char Line[2048]; sprintf(Line, "// Generated By: LeoCAD %s\n// LDraw File: %s\n// Date: %s\n\n", LC_VERSION_TEXT, @@ -2046,7 +2046,7 @@ bool Project::ExportPOVRay(const QString& FileName) " }\n" "#end\n" "#end\n\n", - lcLightType::Point, lcLightType::Spot, lcLightType::Directional, lcLightType::Area); + static_cast(lcLightType::Point), static_cast(lcLightType::Spot), static_cast(lcLightType::Directional), static_cast(lcLightType::Area)); POVFile.WriteLine(Line); for (const lcModelPartsEntry& ModelPart : ModelParts) @@ -2218,7 +2218,7 @@ bool Project::ExportPOVRay(const QString& FileName) sprintf(Line,"#ifndef (Skip%s)\n WriteLight(%i, %i, <%g, %g, %g>, <%g, %g, %g>, <%g, %g, %g>, %g, %g, %g, %g, %g, %g, %i, <%g, %g, %g>, <%g, %g, %g>, %i, %i)\n#end\n\n", LightName.toLatin1().constData(), - LightType, + static_cast(LightType), Shadowless, LightPosition[1], LightPosition[0], LightPosition[2], LightTarget[1], LightTarget[0], LightTarget[2],