+ fix build problems with MSVC and libpack
This commit is contained in:
@@ -46,6 +46,7 @@
|
||||
#include <App/PropertyUnits.h>
|
||||
#include <App/ObjectIdentifier.h>
|
||||
#include <boost/math/special_functions/round.hpp>
|
||||
#include <boost/math/special_functions/trunc.hpp>
|
||||
|
||||
#ifndef M_PI
|
||||
#define M_PI 3.14159265358979323846
|
||||
@@ -770,10 +771,10 @@ Expression * FunctionExpression::eval() const
|
||||
break;
|
||||
}
|
||||
case ROUND:
|
||||
output = round(value);
|
||||
output = boost::math::round(value);
|
||||
break;
|
||||
case TRUNC:
|
||||
output = trunc(value);
|
||||
output = boost::math::trunc(value);
|
||||
break;
|
||||
case CEIL:
|
||||
output = ceil(value);
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#endif
|
||||
|
||||
/// Here the FreeCAD includes sorted by Base,App,Gui......
|
||||
#include <boost/math/special_functions/round.hpp>
|
||||
|
||||
#include <Base/Exception.h>
|
||||
#include <Base/Reader.h>
|
||||
@@ -139,9 +140,9 @@ void PropertyInteger::setValue(const ObjectIdentifier &path, const boost::any &v
|
||||
if (value.type() == typeid(long))
|
||||
setValue(boost::any_cast<long>(value));
|
||||
else if (value.type() == typeid(double))
|
||||
setValue(round(boost::any_cast<double>(value)));
|
||||
setValue(boost::math::round(boost::any_cast<double>(value)));
|
||||
else if (value.type() == typeid(Quantity) && boost::any_cast<Quantity>(value).getUnit().isEmpty())
|
||||
setValue(round(boost::any_cast<Quantity>(value).getValue()));
|
||||
setValue(boost::math::round(boost::any_cast<Quantity>(value).getValue()));
|
||||
else if (value.type() == typeid(int))
|
||||
setValue(boost::any_cast<int>(value));
|
||||
else
|
||||
@@ -1914,7 +1915,7 @@ void PropertyBool::setValue(const ObjectIdentifier &path, const boost::any &valu
|
||||
else if (value.type() == typeid(int))
|
||||
setValue(boost::any_cast<int>(value) != 0);
|
||||
else if (value.type() == typeid(double))
|
||||
setValue(round(boost::any_cast<double>(value)));
|
||||
setValue(boost::math::round(boost::any_cast<double>(value)));
|
||||
else if (value.type() == typeid(Quantity) && boost::any_cast<Quantity>(value).getUnit().isEmpty())
|
||||
setValue(boost::any_cast<Quantity>(value).getValue() != 0);
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user