fix(core): change hole constants to static class
This commit is contained in:
parent
f8424a70ca
commit
26b4746f41
@ -77,13 +77,13 @@ typedef struct shoppyou {
|
||||
#define HOLE_ID (-1)
|
||||
|
||||
// Hole sasa constant
|
||||
const Sasa HOLE_SASA = {HOLE_ID};
|
||||
static const Sasa HOLE_SASA = {HOLE_ID};
|
||||
|
||||
// Hole tanzaku constant
|
||||
const Tanzaku HOLE_TANZAKU = {HOLE_ID};
|
||||
static const Tanzaku HOLE_TANZAKU = {HOLE_ID};
|
||||
|
||||
// Hole kazari constant
|
||||
const Kazari HOLE_KAZARI = {HOLE_ID};
|
||||
static const Kazari HOLE_KAZARI = {HOLE_ID};
|
||||
|
||||
// ==================== SASAHYOU SECTION ==================== //
|
||||
|
||||
|
||||
@ -66,7 +66,7 @@ int shoppyou_save(Shoppyou *shoppyou) {
|
||||
fwrite(&size, 8, 1, shoppyou->file);
|
||||
fflush(shoppyou->file);
|
||||
for (uint64_t i = 0; i < shoppyou->size; i++) {
|
||||
if (shoppyou->database[i].sasa_id != 0 && shoppyou->database[i].tanzaku_id != 0) {
|
||||
if (shoppyou->database[i].sasa_id != HOLE_ID && shoppyou->database[i].tanzaku_id != HOLE_ID) {
|
||||
fwrite(&shoppyou->database[i].created_ts, 8, 1, shoppyou->file);
|
||||
fwrite(&shoppyou->database[i].sasa_id, 8, 1, shoppyou->file);
|
||||
fwrite(&shoppyou->database[i].tanzaku_id, 8, 1, shoppyou->file);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user