From 6a2174ebfa15f47832447981178db15c30b6f5a5 Mon Sep 17 00:00:00 2001 From: Mat M Date: Wed, 7 Sep 2016 07:08:48 -0400 Subject: [PATCH] Add missing explicit specifiers (#27) --- src/backend_x64/reg_alloc.h | 6 +++--- src/frontend/ir/terminal.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/backend_x64/reg_alloc.h b/src/backend_x64/reg_alloc.h index a528b6c9..565465e6 100644 --- a/src/backend_x64/reg_alloc.h +++ b/src/backend_x64/reg_alloc.h @@ -23,8 +23,8 @@ namespace BackendX64 { struct OpArg { OpArg() : type(Type::Operand), inner_operand() {} - OpArg(const Xbyak::Address& address) : type(Type::Address), inner_address(address) {} - OpArg(const Xbyak::Reg& reg) : type(Type::Reg), inner_reg(reg) {} + /* implicit */ OpArg(const Xbyak::Address& address) : type(Type::Address), inner_address(address) {} + /* implicit */ OpArg(const Xbyak::Reg& reg) : type(Type::Reg), inner_reg(reg) {} Xbyak::Operand& operator*() { switch (type) { @@ -86,7 +86,7 @@ private: class RegAlloc final { public: - RegAlloc(BlockOfCode* code) : code(code) {} + explicit RegAlloc(BlockOfCode* code) : code(code) {} /// Late-def Xbyak::Reg64 DefGpr(IR::Inst* def_inst, HostLocList desired_locations = any_gpr) { diff --git a/src/frontend/ir/terminal.h b/src/frontend/ir/terminal.h index b7fcc09f..d719c927 100644 --- a/src/frontend/ir/terminal.h +++ b/src/frontend/ir/terminal.h @@ -94,7 +94,7 @@ struct If { * executed. */ struct CheckHalt { - CheckHalt(Terminal else_) : else_(else_) {} + explicit CheckHalt(Terminal else_) : else_(else_) {} Terminal else_; };