+ fix build problems with MSVC and libpack

This commit is contained in:
wmayer
2015-09-21 00:45:03 +02:00
parent e6d54c6df9
commit e0bdf24c95
10 changed files with 26 additions and 12 deletions

View File

@@ -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);

View File

@@ -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