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:
parent
3728bbc22a
commit
8e0c80f269
2 changed files with 41 additions and 37 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue