Util/Manual: add method Get()
May be more clear than operators.
This commit is contained in:
parent
1e073a196f
commit
3ab0691eec
|
@ -92,20 +92,28 @@ public:
|
|||
#endif
|
||||
}
|
||||
|
||||
operator T &() {
|
||||
T &Get() {
|
||||
return *(T *)data;
|
||||
}
|
||||
|
||||
operator const T &() const {
|
||||
const T &Get() const {
|
||||
return *(const T *)data;
|
||||
}
|
||||
|
||||
operator T &() {
|
||||
return Get();
|
||||
}
|
||||
|
||||
operator const T &() const {
|
||||
return Get();
|
||||
}
|
||||
|
||||
T *operator->() {
|
||||
return (T *)data;
|
||||
return &Get();
|
||||
}
|
||||
|
||||
const T *operator->() const {
|
||||
return (T *)data;
|
||||
return &Get();
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue