Part: Use std::numeric_limits and std::numbers instead of defines
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user