mirror of https://github.com/ecmwf/eccodes.git
ECC-1820: grib_accessors_list.rank made private
This commit is contained in:
parent
5661700367
commit
98cf979823
|
@ -47,12 +47,12 @@ void grib_accessors_list::push(grib_accessor* a, int rank)
|
|||
last->next_ = (grib_accessors_list*)grib_context_malloc_clear(c, sizeof(grib_accessors_list));
|
||||
last->next_->accessor = a;
|
||||
last->next_->prev_ = last;
|
||||
last->next_->rank = rank;
|
||||
last->next_->rank_ = rank;
|
||||
this->last_ = last->next_;
|
||||
}
|
||||
else {
|
||||
this->accessor = a;
|
||||
this->rank = rank;
|
||||
this->rank_ = rank;
|
||||
this->last_ = this;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,11 +26,14 @@ public:
|
|||
int unpack_float(float* val, size_t* buffer_len);
|
||||
int unpack_string(char** val, size_t* buffer_len);
|
||||
|
||||
int rank() const { return rank_; }
|
||||
|
||||
grib_accessor* accessor = nullptr;
|
||||
int rank = 0;
|
||||
grib_accessors_list* next_ = nullptr;
|
||||
grib_accessors_list* prev_ = nullptr;
|
||||
grib_accessors_list* last_ = nullptr;
|
||||
private:
|
||||
int rank_ = 0;
|
||||
};
|
||||
|
||||
grib_accessors_list* grib_accessors_list_create(grib_context* c);
|
||||
|
|
|
@ -384,7 +384,7 @@ static void search_from_accessors_list(grib_accessors_list* al, const grib_acces
|
|||
accessor_result = al->accessor;
|
||||
}
|
||||
if (accessor_result) {
|
||||
result->push(accessor_result, al->rank);
|
||||
result->push(accessor_result, al->rank());
|
||||
}
|
||||
}
|
||||
al = al->next_;
|
||||
|
@ -398,7 +398,7 @@ static void search_from_accessors_list(grib_accessors_list* al, const grib_acces
|
|||
accessor_result = al->accessor;
|
||||
}
|
||||
if (accessor_result) {
|
||||
result->push(accessor_result, al->rank);
|
||||
result->push(accessor_result, al->rank());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -453,7 +453,7 @@ static void grib_find_same_and_push(grib_accessors_list* al, grib_accessor* a)
|
|||
{
|
||||
if (a) {
|
||||
grib_find_same_and_push(al, a->same);
|
||||
al->push(a, al->rank);
|
||||
al->push(a, al->rank());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue