Part: Use std::numeric_limits and std::numbers instead of defines

This commit is contained in:
Benjamin Nauck
2025-03-27 19:01:46 +01:00
parent 9086f0ff14
commit aad5e58955
38 changed files with 259 additions and 247 deletions

View File

@@ -23,10 +23,6 @@
#include "PreCompiled.h"
#ifndef _PreComp_
// to avoid compiler warnings of redefining contents of basic.h
// later by #include <Gui/ViewProviderGeometryObject.h>
# define _USE_MATH_DEFINES // NOLINT
# include <cmath>
# include <Inventor/actions/SoGetBoundingBoxAction.h>
@@ -136,9 +132,10 @@ SectionCut::SectionCut(QWidget* parent)
void SectionCut::initSpinBoxes()
{
ui->cutX->setRange(-INT_MAX, INT_MAX);
ui->cutY->setRange(-INT_MAX, INT_MAX);
ui->cutZ->setRange(-INT_MAX, INT_MAX);
constexpr int max = std::numeric_limits<int>::max();
ui->cutX->setRange(-max, max);
ui->cutY->setRange(-max, max);
ui->cutZ->setRange(-max, max);
}
void SectionCut::initControls(const Base::BoundBox3d& BoundCompound)