mirror of
https://github.com/open-goal/jak-project
synced 2026-09-01 01:52:03 -04:00
[decompiler] Update vector ops, reduce casts (#3849)
Update the decompiler to use the new vf macros. Also, fix a bunch of silly casting issues where accessing inline fields with an offset of 0 would be better than a cast:  --------- Co-authored-by: water111 <awaterford1111445@gmail.com>
This commit is contained in:
@@ -2148,6 +2148,15 @@ DerefToken to_token(const FieldReverseLookupOutput::Token& in) {
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<DerefToken> to_tokens(const std::vector<FieldReverseLookupOutput::Token>& in) {
|
||||
std::vector<DerefToken> ret;
|
||||
ret.reserve(in.size());
|
||||
for (auto& x : in) {
|
||||
ret.push_back(to_token(x));
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
DerefElement::DerefElement(Form* base, bool is_addr_of, DerefToken token)
|
||||
: m_base(base), m_is_addr_of(is_addr_of), m_tokens({std::move(token)}) {
|
||||
m_base->parent_element = this;
|
||||
|
||||
Reference in New Issue
Block a user