From d07c5bc14edbe071ee7b4f47f174780e95e451aa Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Sun, 15 Nov 2020 13:55:18 +0100 Subject: Simplify Asm construction --- asm/intel64/pop.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'asm/intel64/pop.cpp') diff --git a/asm/intel64/pop.cpp b/asm/intel64/pop.cpp index 8528b15..6d8b734 100644 --- a/asm/intel64/pop.cpp +++ b/asm/intel64/pop.cpp @@ -9,7 +9,7 @@ using namespace std::string_literals; -Op_pop::Op_pop(Asm::Args& args) +Op_pop::Op_pop(const Asm::Args& args) { if (args[0].type() == typeid(Asm::Args::Register64)) { // pop reg64 machine_code = std::vector{ 0x58 } + RegNo(std::any_cast(args[0]).name()); @@ -21,7 +21,7 @@ Op_pop::Op_pop(Asm::Args& args) namespace { bool registered { - registerOp(mangleName("pop"), [](Asm::Args& args) -> std::shared_ptr{ + registerOp(mangleName("pop"), [](const Asm::Args& args) -> std::shared_ptr{ return std::make_shared(args); }) }; -- cgit v1.2.3