mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-16 07:07:57 -05:00
video_core/ast: Supply const accessors for data where applicable
Provides const equivalents of data accessors for use within const contexts.
This commit is contained in:
@ -48,11 +48,11 @@ public:
|
||||
|
||||
void Init(ASTNode first, ASTNode parent);
|
||||
|
||||
ASTNode GetFirst() {
|
||||
ASTNode GetFirst() const {
|
||||
return first;
|
||||
}
|
||||
|
||||
ASTNode GetLast() {
|
||||
ASTNode GetLast() const {
|
||||
return last;
|
||||
}
|
||||
|
||||
@ -177,6 +177,10 @@ public:
|
||||
return &data;
|
||||
}
|
||||
|
||||
const ASTData* GetInnerData() const {
|
||||
return &data;
|
||||
}
|
||||
|
||||
ASTNode GetNext() const {
|
||||
return next;
|
||||
}
|
||||
@ -189,6 +193,10 @@ public:
|
||||
return *manager;
|
||||
}
|
||||
|
||||
const ASTZipper& GetManager() const {
|
||||
return *manager;
|
||||
}
|
||||
|
||||
std::optional<u32> GetGotoLabel() const {
|
||||
auto inner = std::get_if<ASTGoto>(&data);
|
||||
if (inner) {
|
||||
|
Reference in New Issue
Block a user