From d1c5f2dc5682706b91532749e83e419a3aff19ab Mon Sep 17 00:00:00 2001 From: Curve Date: Sun, 19 May 2024 18:48:03 +0200 Subject: [PATCH] refactor(instruction): minor cleanup --- src/instruction.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/instruction.cpp b/src/instruction.cpp index 167efe4..7df60c3 100644 --- a/src/instruction.cpp +++ b/src/instruction.cpp @@ -65,7 +65,7 @@ namespace lime std::optional instruction::prev() const { - auto start = m_impl->address - max_instruction_size; + const auto start = m_impl->address - max_instruction_size; std::optional last; for (auto current = start; current < m_impl->address; current++) @@ -77,7 +77,7 @@ namespace lime continue; } - auto next = instruction->next(); + const auto next = instruction->next(); if (!next || next->addr() != m_impl->address) { @@ -150,7 +150,7 @@ namespace lime std::strong_ordering instruction::operator<=>(const instruction &other) const { - auto address = other.addr(); + const auto address = other.addr(); if (address > m_impl->address) { @@ -177,7 +177,7 @@ namespace lime std::optional instruction::at(std::uintptr_t address) { - auto page = page::at(address); + const auto page = page::at(address); if (!page || !(page->prot() & protection::read)) {