Browse Source

fix: `SHOULD_PANIC` as static inline function

master
Dnomd343 2 years ago
parent
commit
0d458c0572
  1. 2
      test/codec/common_code.cc
  2. 2
      test/codec/short_code.cc

2
test/codec/common_code.cc

@ -12,7 +12,7 @@ using klotski::CommonCode;
const static uint64_t TEST_CODE = 0x1'A9BF'0C00;
const static std::string TEST_CODE_STR = "1A9BF0C00";
inline void SHOULD_PANIC(const std::function<void(void)> &func) {
static inline void SHOULD_PANIC(const std::function<void()> &func) {
bool panic_flag = false;
try {
func();

2
test/codec/short_code.cc

@ -12,7 +12,7 @@ using klotski::BasicRanges;
const static uint32_t TEST_CODE = 4091296;
const static std::string TEST_CODE_STR = "4WVE1";
inline void SHOULD_PANIC(const std::function<void(void)> &func) {
static inline void SHOULD_PANIC(const std::function<void()> &func) {
bool panic_flag = false;
try {
func();

Loading…
Cancel
Save