diff --git a/src/export.cpp b/src/export.cpp index 621fa2e..31c6c37 100644 --- a/src/export.cpp +++ b/src/export.cpp @@ -917,13 +917,13 @@ void SolveSpaceUI::ExportMeshAsQ3doTo(FILE *f, SMesh *sm) { } Vector faceNormal = t.Normal(); - auto a = q3d::Vector3(t.a.x/s, t.a.y/s, t.a.z/s); - auto b = q3d::Vector3(t.b.x/s, t.b.y/s, t.b.z/s); - auto c = q3d::Vector3(t.c.x/s, t.c.y/s, t.c.z/s); - auto fn = q3d::Vector3(faceNormal.x, faceNormal.y, faceNormal.x); - auto n1 = q3d::Vector3(t.normals[0].x, t.normals[0].y, t.normals[0].z); - auto n2 = q3d::Vector3(t.normals[1].x, t.normals[1].y, t.normals[1].z); - auto n3 = q3d::Vector3(t.normals[2].x, t.normals[2].y, t.normals[2].z); + auto a = q3d::Vector3((float)(t.a.x/s), (float)(t.a.y/s), (float)(t.a.z/s)); + auto b = q3d::Vector3((float)(t.b.x/s), (float)(t.b.y/s), (float)(t.b.z/s)); + auto c = q3d::Vector3((float)(t.c.x/s), (float)(t.c.y/s), (float)(t.c.z/s)); + auto fn = q3d::Vector3((float)faceNormal.x, (float)faceNormal.y, (float)faceNormal.x); + auto n1 = q3d::Vector3((float)t.normals[0].x, (float)t.normals[0].y, (float)t.normals[0].z); + auto n2 = q3d::Vector3((float)t.normals[1].x, (float)t.normals[1].y, (float)t.normals[1].z); + auto n3 = q3d::Vector3((float)t.normals[2].x, (float)t.normals[2].y, (float)t.normals[2].z); auto tri = q3d::CreateTriangle(builder, &a, &b, &c, &fn, &n1, &n2, &n3); materialTriangles[color].push_back(tri); } diff --git a/src/platform/guiwin.cpp b/src/platform/guiwin.cpp index 2f6ce52..8a54dee 100644 --- a/src/platform/guiwin.cpp +++ b/src/platform/guiwin.cpp @@ -1227,7 +1227,7 @@ public: } void SetCursor(Cursor cursor) override { - LPWSTR cursorName; + LPWSTR cursorName = IDC_ARROW; switch(cursor) { case Cursor::POINTER: cursorName = IDC_ARROW; break; case Cursor::HAND: cursorName = IDC_HAND; break; diff --git a/src/render/render.h b/src/render/render.h index 70d5863..b1692f1 100644 --- a/src/render/render.h +++ b/src/render/render.h @@ -285,8 +285,8 @@ public: const Camera &GetCamera() const override { return camera; } // ViewportCanvas interface. - void SetCamera(const Camera &camera) override { this->camera = camera; } - void SetLighting(const Lighting &lighting) override { this->lighting = lighting; } + void SetCamera(const Camera &cam) override { this->camera = cam; } + void SetLighting(const Lighting &light) override { this->lighting = light; } void DrawLine(const Vector &a, const Vector &b, hStroke hcs) override; void DrawEdges(const SEdgeList &el, hStroke hcs) override; diff --git a/src/solvespace.cpp b/src/solvespace.cpp index 4d19136..a3a53ca 100644 --- a/src/solvespace.cpp +++ b/src/solvespace.cpp @@ -802,7 +802,6 @@ void SolveSpaceUI::MenuAnalyze(Command id) { case Command::AREA: { Group *g = SK.GetGroup(SS.GW.activeGroup); SS.GW.GroupSelection(); - auto const &gs = SS.GW.gs; if(gs.faces > 0) { std::vector faces; @@ -844,8 +843,8 @@ void SolveSpaceUI::MenuAnalyze(Command id) { if(gs.n > 0 && gs.n == gs.entities) { double perimeter = 0.0; for(int i = 0; i < gs.entities; i++) { - Entity *e = SK.entity.FindById(gs.entity[i]); - SEdgeList *el = e->GetOrGenerateEdges(); + Entity *en = SK.entity.FindById(gs.entity[i]); + SEdgeList *el = en->GetOrGenerateEdges(); for(const SEdge &e : el->l) { perimeter += e.b.Minus(e.a).Magnitude(); } diff --git a/src/textscreens.cpp b/src/textscreens.cpp index 7e94239..1ea8f13 100644 --- a/src/textscreens.cpp +++ b/src/textscreens.cpp @@ -604,7 +604,7 @@ void TextWindow::ScreenStepDimGo(int link, uint32_t v) { if(time - SS.TW.stepDim.time < STEP_MILLIS) { SS.TW.stepDim.timer->RunAfterNextFrame(); } else { - SS.TW.stepDim.timer->RunAfter(time - SS.TW.stepDim.time - STEP_MILLIS); + SS.TW.stepDim.timer->RunAfter((unsigned)(time - SS.TW.stepDim.time - STEP_MILLIS)); } SS.TW.stepDim.time = time; } else { @@ -758,7 +758,8 @@ void TextWindow::EditControlDone(std::string s) { Group *g = SK.group.FindByIdNoOops(SS.TW.shown.group); if(!g) break; - g->color = RgbaColor::FromFloat(rgb.x, rgb.y, rgb.z, g->color.alphaF()); + g->color = RgbaColor::FromFloat((float)rgb.x, (float)rgb.y, (float)rgb.z, + g->color.alphaF()); SS.MarkGroupDirty(g->h); SS.GW.ClearSuper();