mirror of https://github.com/vitalif/openscad
Merge pull request #692 from openscad/uint32-compile-fix
Fix compile error by using uint32_t from boost namespace.recursion-fix
commit
c5de27102b
|
@ -78,7 +78,7 @@ void ControlModule::for_eval(AbstractNode &node, const ModuleInstantiation &inst
|
|||
Context c(ctx);
|
||||
if (it_values.type() == Value::RANGE) {
|
||||
Value::RangeType range = it_values.toRange();
|
||||
uint32_t steps = range.nbsteps();
|
||||
boost::uint32_t steps = range.nbsteps();
|
||||
if (steps >= 10000) {
|
||||
PRINTB("WARNING: Bad range parameter in for statement: too many elements (%lu).", steps);
|
||||
} else {
|
||||
|
@ -230,7 +230,7 @@ AbstractNode *ControlModule::instantiate(const Context* /*ctx*/, const ModuleIns
|
|||
else if (value.type() == Value::RANGE) {
|
||||
AbstractNode* node = new AbstractNode(inst);
|
||||
Value::RangeType range = value.toRange();
|
||||
uint32_t steps = range.nbsteps();
|
||||
boost::uint32_t steps = range.nbsteps();
|
||||
if (steps >= 10000) {
|
||||
PRINTB("WARNING: Bad range parameter for children: too many elements (%lu).", steps);
|
||||
return NULL;
|
||||
|
|
|
@ -643,9 +643,9 @@ void Value::RangeType::normalize() {
|
|||
}
|
||||
}
|
||||
|
||||
uint32_t Value::RangeType::nbsteps() const {
|
||||
boost::uint32_t Value::RangeType::nbsteps() const {
|
||||
if (boost::math::isnan(step_val) || boost::math::isinf(begin_val) || (boost::math::isinf(end_val))) {
|
||||
return std::numeric_limits<uint32_t>::max();
|
||||
return std::numeric_limits<boost::uint32_t>::max();
|
||||
}
|
||||
|
||||
if ((begin_val == end_val) || boost::math::isinf(step_val)) {
|
||||
|
@ -653,7 +653,7 @@ uint32_t Value::RangeType::nbsteps() const {
|
|||
}
|
||||
|
||||
if (step_val == 0) {
|
||||
return std::numeric_limits<uint32_t>::max();
|
||||
return std::numeric_limits<boost::uint32_t>::max();
|
||||
}
|
||||
|
||||
double steps;
|
||||
|
|
|
@ -86,7 +86,7 @@ public:
|
|||
iterator end() { return iterator(*this, RANGE_TYPE_END); }
|
||||
|
||||
/// return number of steps, max uint32_t value if step is 0
|
||||
uint32_t nbsteps() const;
|
||||
boost::uint32_t nbsteps() const;
|
||||
|
||||
friend class tostring_visitor;
|
||||
friend class bracket_visitor;
|
||||
|
|
Loading…
Reference in New Issue