mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
cleanup: use range based for in download code
This removes a constant describing the length of the array. The enumerated_range code had to be adapted, because the interaction of C-type arrays with the C++ typesystem is mad. With C-type arrays, one has to pass a reference to std::declval. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
b61732da42
commit
a2845ece82
2 changed files with 6 additions and 6 deletions
|
|
@ -40,7 +40,7 @@ class enumerated_range
|
|||
{
|
||||
Range &base;
|
||||
public:
|
||||
using base_iterator = decltype(std::begin(std::declval<Range>()));
|
||||
using base_iterator = decltype(std::begin(std::declval<Range &>()));
|
||||
class iterator {
|
||||
int idx;
|
||||
base_iterator it;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue