diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/control.cc | 4 | ||||
-rw-r--r-- | src/value.cc | 4 | ||||
-rw-r--r-- | src/value.h | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/control.cc b/src/control.cc index 6b10a28..d5f664e 100644 --- a/src/control.cc +++ b/src/control.cc @@ -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(); - unsigned long steps = range.nbsteps(); + uint32_t steps = range.nbsteps(); if (steps >= 10000) { PRINTB("WARNING: Bad range parameter in for statement: too many elements (%lu).", steps); } else { @@ -229,7 +229,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(); - unsigned long steps = range.nbsteps(); + uint32_t steps = range.nbsteps(); if (steps >= 10000) { PRINTB("WARNING: Bad range parameter for children: too many elements (%lu).", steps); return NULL; diff --git a/src/value.cc b/src/value.cc index 931c616..5afb650 100644 --- a/src/value.cc +++ b/src/value.cc @@ -625,13 +625,13 @@ void Value::RangeType::normalize() { } } -unsigned long Value::RangeType::nbsteps() const { +uint32_t Value::RangeType::nbsteps() const { if (begin_val == end_val) { return 0; } if (step_val == 0) { - return std::numeric_limits<unsigned long>::max(); + return std::numeric_limits<uint32_t>::max(); } double steps; diff --git a/src/value.h b/src/value.h index 4671cdc..8197806 100644 --- a/src/value.h +++ b/src/value.h @@ -84,8 +84,8 @@ public: iterator begin() { return iterator(*this, RANGE_TYPE_BEGIN); } iterator end() { return iterator(*this, RANGE_TYPE_END); } - /// return number of steps, max int value if step is null - unsigned long nbsteps() const; + /// return number of steps, max uint32_ value if step is 0 + uint32_t nbsteps() const; friend class tostring_visitor; friend class bracket_visitor; |