Reverse the linked list of data_validator_group #2 (#389)

* Reverse the linked list of data_validator_group and maintain a first node
for search from index 0

Fixes issue PX4/Firmware#8644

* fix code style

* validator: fix shadowing of 'sibling' argument
This commit is contained in:
Beat Küng
2018-01-30 09:11:01 +11:00
committed by Paul Riseborough
parent 337cdcc59a
commit d078d68f64
4 changed files with 31 additions and 12 deletions
+7 -1
View File
@@ -48,7 +48,7 @@ class __EXPORT DataValidator {
public:
static const unsigned dimensions = 3;
DataValidator(DataValidator *prev_sibling = nullptr);
DataValidator();
virtual ~DataValidator() = default;
/**
@@ -72,6 +72,12 @@ public:
*/
DataValidator* sibling() { return _sibling; }
/**
* Set the sibling to the next node in the group
*
*/
void setSibling(DataValidator* new_sibling) { _sibling = new_sibling; }
/**
* Get the confidence of this validator
* @return the confidence between 0 and 1