Rearrange iterator code in KeyAddrBitfield to simplify declarations

Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
pull/1121/head
Michael Richters 3 years ago
parent 8aa9206a08
commit fd17553f1a
No known key found for this signature in database
GPG Key ID: 1288FD13E4EEF0C0

@ -106,16 +106,6 @@ class KeyAddrBitfield {
// ----------------------------------------------------------------------------
// Iterator!
public:
class Iterator;
friend class KeyAddrBitfield::Iterator;
Iterator begin() const {
return Iterator{*this, 0};
}
Iterator end() const {
return Iterator{*this, total_blocks};
}
class Iterator {
public:
Iterator(const KeyAddrBitfield &bitfield, uint8_t x)
@ -171,6 +161,15 @@ class KeyAddrBitfield {
}; // class Iterator {
friend class Iterator;
Iterator begin() const {
return Iterator{*this, 0};
}
Iterator end() const {
return Iterator{*this, total_blocks};
}
} __attribute__((packed)); // class KeyAddrBitfield {
} // namespace kaleidoscope {

Loading…
Cancel
Save