IntegerEditor: reverse digit sequence in get_value() to use the more commonplace endiannes as default
This commit is contained in:
parent
ebada704c0
commit
880610c39d
1 changed files with 1 additions and 1 deletions
|
@ -106,7 +106,7 @@ impl PosIntEditor {
|
||||||
pub fn get_value(&self) -> u32 {
|
pub fn get_value(&self) -> u32 {
|
||||||
let mut value = 0;
|
let mut value = 0;
|
||||||
let mut weight = 1;
|
let mut weight = 1;
|
||||||
for digit_value in self.get_data_port().get_view().unwrap().iter() {
|
for digit_value in self.get_data_port().get_view().unwrap().iter().collect::<Vec<_>>().into_iter().rev() {
|
||||||
value += digit_value * weight;
|
value += digit_value * weight;
|
||||||
weight *= self.radix;
|
weight *= self.radix;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue