From 67ca25dc5cb78b86130ffe39ae83dcf4b1a9db90 Mon Sep 17 00:00:00 2001 From: Dnomd343 Date: Wed, 18 Jan 2023 14:57:28 +0800 Subject: [PATCH] fix: core compile warning --- src/core/core.cc | 8 ++++---- src/core/core.h | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/core/core.cc b/src/core/core.cc index 9b71b39..24d0a25 100644 --- a/src/core/core.cc +++ b/src/core/core.cc @@ -28,10 +28,10 @@ #define RELEASE_2x1(FILTER) RELEASE(NEXT_CODE_2x1, FILTER) #define RELEASE_2x2(FILTER) RELEASE(NEXT_CODE_2x2, FILTER) -#define NEXT_CODE_1x1 (code & ~(F_1x1 << addr) | (C_1x1 << next_addr)) -#define NEXT_CODE_1x2 (code & ~(F_1x2 << addr) | (C_1x2 << next_addr)) -#define NEXT_CODE_2x1 (code & ~(F_2x1 << addr) | (C_2x1 << next_addr)) -#define NEXT_CODE_2x2 (code & ~(F_2x2 << addr) | (C_2x2 << next_addr)) +#define NEXT_CODE_1x1 ((code & ~(F_1x1 << addr)) | (C_1x1 << next_addr)) +#define NEXT_CODE_1x2 ((code & ~(F_1x2 << addr)) | (C_1x2 << next_addr)) +#define NEXT_CODE_2x1 ((code & ~(F_2x1 << addr)) | (C_2x1 << next_addr)) +#define NEXT_CODE_2x2 ((code & ~(F_2x2 << addr)) | (C_2x2 << next_addr)) //////////////////////////////////////// diff --git a/src/core/core.h b/src/core/core.h index d6e1f82..0649626 100644 --- a/src/core/core.h +++ b/src/core/core.h @@ -18,14 +18,14 @@ public: private: struct cache_t { - uint64_t code; // case raw code - uint64_t mask; // only 000 or 111 - int filter; // UP | DOWN | LEFT | RIGHT - int addr; // (0 ~ 19) * 3 + uint64_t code; + uint64_t mask; /// 000 or 111 + int filter; /// UP | DOWN | LEFT | RIGHT + int addr; /// (0 ~ 19) * 3 }; int cache_size = 1; - cache_t cache[16] = {0}; + cache_t cache[16]{}; release_t release; // release code and mask void move_1x1(uint64_t code, int addr);