mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-04 00:00:28 -06:00
Added size() method to CellRange inner class.
This commit is contained in:
parent
9569ea304f
commit
5c669614bf
@ -92,6 +92,11 @@ namespace Opm
|
||||
*/
|
||||
typedef CellIter const_iterator;
|
||||
|
||||
/**
|
||||
* Size type for this range.
|
||||
*/
|
||||
typedef typename std::vector<CellId>::size_type size_type;
|
||||
|
||||
/**
|
||||
* Beginning of cell range.
|
||||
*/
|
||||
@ -102,6 +107,11 @@ namespace Opm
|
||||
*/
|
||||
const_iterator end() const { return e_; }
|
||||
|
||||
/**
|
||||
* Number of elements in the range.
|
||||
*/
|
||||
size_type size() const { return e_ - b_; }
|
||||
|
||||
private:
|
||||
const_iterator b_;
|
||||
const_iterator e_;
|
||||
|
Loading…
Reference in New Issue
Block a user