Skip to content

Commit

Permalink
refactor(instruction): minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Curve committed May 19, 2024
1 parent d81a920 commit d1c5f2d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/instruction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ namespace lime

std::optional<instruction> instruction::prev() const
{
auto start = m_impl->address - max_instruction_size;
const auto start = m_impl->address - max_instruction_size;
std::optional<instruction> last;

for (auto current = start; current < m_impl->address; current++)
Expand All @@ -77,7 +77,7 @@ namespace lime
continue;
}

auto next = instruction->next();
const auto next = instruction->next();

if (!next || next->addr() != m_impl->address)
{
Expand Down Expand Up @@ -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)
{
Expand All @@ -177,7 +177,7 @@ namespace lime

std::optional<instruction> instruction::at(std::uintptr_t address)
{
auto page = page::at(address);
const auto page = page::at(address);

if (!page || !(page->prot() & protection::read))
{
Expand Down

0 comments on commit d1c5f2d

Please sign in to comment.