MSVC: Fix several compiler warnings

This commit is contained in:
wmayer
2024-09-11 15:23:18 +02:00
committed by wwmayer
parent 53978bbf30
commit dad175cee9
4 changed files with 7 additions and 3 deletions

View File

@@ -402,7 +402,7 @@ void DlgAddPropertyVarSet::onEditFinished() {
checkGroup();
checkType();
}
catch (const CreatePropertyException& e) {
catch (const CreatePropertyException&) {
if (!namePropertyToAdd.empty()) {
clearCurrentProperty();
}

View File

@@ -1976,7 +1976,7 @@ void MainWindow::renderDevBuildWarning(
{
// Create a background box that fades out the artwork for better legibility
QColor fader (Qt::white);
constexpr float halfDensity (0.65);
constexpr float halfDensity (0.65F);
fader.setAlphaF(halfDensity);
QBrush fillBrush(fader, Qt::BrushStyle::SolidPattern);
painter.setBrush(fillBrush);

View File

@@ -23,6 +23,10 @@
#ifndef PATHSIMULATOR_CAMSimulatorGui_H
#define PATHSIMULATOR_CAMSimulatorGui_H
#ifdef _MSC_VER
#pragma warning(disable : 4251)
#endif
#include <Mod/Part/App/TopoShape.h>
#include <QWindow>
#include <QOpenGLExtraFunctions>

View File

@@ -570,7 +570,7 @@ void SimDisplay::UpdateProjection()
shaderLinePath.UpdateProjectionMat(projmat);
shaderLinePath.UpdateObjColor(pathLineColorPassed);
projmat[2][2] *= 0.99999;
projmat[2][2] *= 0.99999F;
shaderGeomCloser.Activate();
shaderGeomCloser.UpdateProjectionMat(projmat);
}