mirror of
https://github.com/JakeHillion/object-introspection.git
synced 2024-11-12 21:56:54 +00:00
oil: update iterator for range based for loops
This commit is contained in:
parent
ac8ad26407
commit
1d387ca880
@ -41,9 +41,15 @@ inline IntrospectionResult::const_iterator::const_iterator(
|
||||
std::vector<uint8_t>::const_iterator data)
|
||||
: data_(data) {
|
||||
}
|
||||
inline IntrospectionResult::const_iterator IntrospectionResult::begin() const {
|
||||
return cbegin();
|
||||
}
|
||||
inline IntrospectionResult::const_iterator IntrospectionResult::cbegin() const {
|
||||
return ++const_iterator{buf_.cbegin(), inst_};
|
||||
}
|
||||
inline IntrospectionResult::const_iterator IntrospectionResult::end() const {
|
||||
return cend();
|
||||
}
|
||||
inline IntrospectionResult::const_iterator IntrospectionResult::cend() const {
|
||||
return {buf_.cend()};
|
||||
}
|
||||
|
@ -56,7 +56,10 @@ class IntrospectionResult {
|
||||
|
||||
IntrospectionResult(std::vector<uint8_t> buf, exporters::inst::Inst inst);
|
||||
|
||||
const_iterator begin() const;
|
||||
const_iterator cbegin() const;
|
||||
|
||||
const_iterator end() const;
|
||||
const_iterator cend() const;
|
||||
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user