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/push.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'asm/intel64/push.cpp') diff --git a/asm/intel64/push.cpp b/asm/intel64/push.cpp index bad2c90..37acec9 100644 --- a/asm/intel64/push.cpp +++ b/asm/intel64/push.cpp @@ -9,7 +9,7 @@ using namespace std::string_literals; -Op_push::Op_push(Asm::Args& args) +Op_push::Op_push(const Asm::Args& args) { if (args[0].type() == typeid(Asm::Args::Register64)) { // push reg64 machine_code = std::vector{ 0x50 } + RegNo(std::any_cast(args[0]).name()); @@ -21,7 +21,7 @@ Op_push::Op_push(Asm::Args& args) namespace { bool registered { - registerOp(mangleName("push"), [](Asm::Args& args) -> std::shared_ptr{ + registerOp(mangleName("push"), [](const Asm::Args& args) -> std::shared_ptr{ return std::make_shared(args); }) }; -- cgit v1.2.3