jitstate: const correctness
GetReturnFromRunCodeAddress is const qualified, so this can accept a const pointer. This also allows for making the constructor accept a const pointer as well.
This commit is contained in:
parent
9ed9f4c565
commit
74ee92ee38
2 changed files with 3 additions and 3 deletions
|
@ -14,7 +14,7 @@
|
|||
namespace Dynarmic {
|
||||
namespace BackendX64 {
|
||||
|
||||
void JitState::ResetRSB(BlockOfCode* code) {
|
||||
void JitState::ResetRSB(const BlockOfCode* code) {
|
||||
for (auto& value : rsb_codeptrs) {
|
||||
value = u64(code->GetReturnFromRunCodeAddress());
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ class BlockOfCode;
|
|||
constexpr size_t SpillCount = 32;
|
||||
|
||||
struct JitState {
|
||||
JitState(BlockOfCode* code) { ResetRSB(code); }
|
||||
explicit JitState(const BlockOfCode* code) { ResetRSB(code); }
|
||||
|
||||
u32 Cpsr = 0;
|
||||
std::array<u32, 16> Reg{}; // Current register file.
|
||||
|
@ -43,7 +43,7 @@ struct JitState {
|
|||
u32 rsb_ptr = 0;
|
||||
std::array<u64, RSBSize> rsb_location_descriptors;
|
||||
std::array<u64, RSBSize> rsb_codeptrs;
|
||||
void ResetRSB(BlockOfCode* code);
|
||||
void ResetRSB(const BlockOfCode* code);
|
||||
|
||||
u32 FPSCR_IDC = 0;
|
||||
u32 FPSCR_UFC = 0;
|
||||
|
|
Loading…
Reference in a new issue