mirror of https://github.com/ecmwf/eccodes.git
Modernisation: has_next() returns bool instead of long
This commit is contained in:
parent
b490cfc3d3
commit
2bd5482629
|
@ -29,7 +29,7 @@ public:
|
|||
virtual int previous(double*, double*, double*) = 0;
|
||||
virtual int reset() = 0;
|
||||
virtual int destroy() = 0;
|
||||
virtual long has_next() = 0;
|
||||
virtual bool has_next() = 0;
|
||||
virtual Iterator* create() const = 0;
|
||||
|
||||
public:
|
||||
|
|
|
@ -88,13 +88,13 @@ int Gen::destroy()
|
|||
return Iterator::destroy();
|
||||
}
|
||||
|
||||
long Gen::has_next()
|
||||
bool Gen::has_next()
|
||||
{
|
||||
if (flags_ == 0 && data_ == NULL)
|
||||
return 0;
|
||||
return false;
|
||||
if (e_ >= (long)(nv_ - 1))
|
||||
return 0;
|
||||
return 1;
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
int Gen::previous(double*, double*, double*) {
|
||||
|
|
|
@ -27,7 +27,7 @@ public:
|
|||
int previous(double*, double*, double*) override;
|
||||
int reset() override;
|
||||
int destroy() override;
|
||||
long has_next() override; // TODO(maee/masn): return bool please!
|
||||
bool has_next() override;
|
||||
|
||||
public:
|
||||
//int get(double*, double*, double*);
|
||||
|
|
Loading…
Reference in New Issue