Browse Source

fix: core compile warning

master
Dnomd343 2 years ago
parent
commit
67ca25dc5c
  1. 8
      src/core/core.cc
  2. 10
      src/core/core.h

8
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))
////////////////////////////////////////

10
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);

Loading…
Cancel
Save