Extend OffsetMember with direct operator=/operator[]

It was found to be semantically advantageous to directly pass-through certain operators such as the assignment (`=`) and array index (`[]`) operators. These would require a dereference prior to their usage otherwise but now can be directly used.
This commit is contained in:
PixelyIon 2021-11-10 21:18:19 +05:30
parent cc7b2a0ab8
commit 69761389ff

View File

@ -243,6 +243,15 @@ namespace skyline::util {
ValueType value;
public:
OffsetMember &operator=(const ValueType &pValue) {
value = pValue;
return *this;
}
auto operator[](std::size_t index) {
return value[index];
}
ValueType &operator*() {
return value;
}