Fix MSVC warnings.

This commit is contained in:
Roman Telezhynskyi 2023-03-09 16:17:54 +02:00
parent 429c321852
commit 8b591847b1
2 changed files with 5 additions and 4 deletions

View File

@ -736,8 +736,8 @@ void MainWindow::ReadMeasurements(qreal baseA, qreal baseB, qreal baseC)
{
const QList<MeasurementDimension_p> dimensions = m_m->Dimensions().values();
auto InitDimensionLabel = [this, dimensions](const MeasurementDimension_p& dimension,
QPointer<QLabel> &name, QPointer<QComboBox> &control)
auto InitDimensionLabel = [this](const MeasurementDimension_p& dimension,
QPointer<QLabel> &name, QPointer<QComboBox> &control)
{
if (dimension.isNull())
{
@ -4834,9 +4834,8 @@ void MainWindow::InitDimensionControls()
if (VAbstractValApplication::VApp()->GetMeasurementsType() == MeasurementsType::Multisize)
{
const QList<MeasurementDimension_p> dimensions = m_m->Dimensions().values();
const QString unit = UnitsToStr(VAbstractValApplication::VApp()->MeasurementsUnits(), true);
auto InitControl = [this, dimensions, unit](int index, QPointer<QLabel> &name, QPointer<QComboBox> &control)
auto InitControl = [this, dimensions](int index, QPointer<QLabel> &name, QPointer<QComboBox> &control)
{
if (dimensions.size() > index)
{

View File

@ -109,6 +109,7 @@ void RemoveLayoutPath(const QString &path, bool usedNotExistedDir)
}
//---------------------------------------------------------------------------------------------------------------------
#if !defined(V_NO_ASSERT)
Q_DECL_UNUSED void InsertGlobalContours(const QList<QGraphicsScene *> &scenes, const QList<QGraphicsItem *> &gcontours);
void InsertGlobalContours(const QList<QGraphicsScene *> &scenes, const QList<QGraphicsItem *> &gcontours)
{
@ -122,6 +123,7 @@ void InsertGlobalContours(const QList<QGraphicsScene *> &scenes, const QList<QGr
scenes.at(i)->addItem(gcontours.at(i));
}
}
#endif
}
//---------------------------------------------------------------------------------------------------------------------