From 1fc34a04d6ee3c78d5749c79a87fee8fb43ab8ee Mon Sep 17 00:00:00 2001 From: YenHaoChen Date: Wed, 11 Jan 2023 22:03:07 +0800 Subject: [PATCH] triggers: refactor: use static and remove const for legalize_match() Since this method no longer use 'this', we turn this method into static. --- riscv/triggers.cc | 2 +- riscv/triggers.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/riscv/triggers.cc b/riscv/triggers.cc index fa043255..3339d38f 100644 --- a/riscv/triggers.cc +++ b/riscv/triggers.cc @@ -221,7 +221,7 @@ std::optional mcontrol_common_t::detect_memory_access_match(proc return std::nullopt; } -mcontrol_common_t::match_t mcontrol_common_t::legalize_match(reg_t val) const noexcept +mcontrol_common_t::match_t mcontrol_common_t::legalize_match(reg_t val) noexcept { switch (val) { case MATCH_EQUAL: diff --git a/riscv/triggers.h b/riscv/triggers.h index 074c7b64..f1415605 100644 --- a/riscv/triggers.h +++ b/riscv/triggers.h @@ -207,7 +207,7 @@ private: bool simple_match(unsigned xlen, reg_t value) const; protected: - match_t legalize_match(reg_t val) const noexcept; + static match_t legalize_match(reg_t val) noexcept; static bool legalize_timing(reg_t val, reg_t timing_mask, reg_t select_mask, reg_t execute_mask, reg_t load_mask) noexcept; bool dmode = false; action_t action = ACTION_DEBUG_EXCEPTION;