mirror of
https://github.com/yuzu-mirror/oaknut.git
synced 2025-12-06 07:01:59 +01:00
oaknut: Add const qualifier to AddrOffset ctor
Can't seem to tell if this is intentionally non-const, or not, but this fixes some function-pointer issues I was facing on MacOS.
This commit is contained in:
parent
4af500cb5b
commit
36243256f3
|
|
@ -45,7 +45,7 @@ struct AddrOffset {
|
|||
: m_payload(&label)
|
||||
{}
|
||||
|
||||
AddrOffset(void* ptr)
|
||||
AddrOffset(const void* ptr)
|
||||
: m_payload(ptr)
|
||||
{}
|
||||
|
||||
|
|
@ -63,7 +63,7 @@ struct AddrOffset {
|
|||
private:
|
||||
template<typename Policy>
|
||||
friend class BasicCodeGenerator;
|
||||
std::variant<std::uint32_t, Label*, void*> m_payload;
|
||||
std::variant<std::uint32_t, Label*, const void*> m_payload;
|
||||
};
|
||||
|
||||
template<std::size_t bitsize, std::size_t shift_amount>
|
||||
|
|
|
|||
|
|
@ -249,7 +249,7 @@ private:
|
|||
label->m_wbs.emplace_back(Label::Writeback{Policy::current_address(), ~splat, static_cast<Label::EmitFunctionType>(encode_fn)});
|
||||
return 0u;
|
||||
},
|
||||
[&](void* p) {
|
||||
[&](const void* p) {
|
||||
return encode_fn(Policy::current_address(), reinterpret_cast<std::uintptr_t>(p));
|
||||
},
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue