mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-26 15:54:18 +01:00
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:
parent
cc7b2a0ab8
commit
69761389ff
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user