style(core): code cleanup
This commit is contained in:
parent
60f44fb82f
commit
2d46b72929
@ -152,10 +152,7 @@ int tanzaku_add(Sappyou *sappyou, const char *name, const char *description) {
|
||||
}
|
||||
|
||||
int tanzaku_rem(Sappyou *sappyou, uint64_t tanzaku_id) {
|
||||
if (tanzaku_id == HOLE_ID) {
|
||||
return 1;
|
||||
}
|
||||
if (tanzaku_id >= sappyou->size) {
|
||||
if (tanzaku_id == HOLE_ID || tanzaku_id >= sappyou->size) {
|
||||
return 1;
|
||||
}
|
||||
if (sappyou->database[tanzaku_id].id == HOLE_ID) {
|
||||
|
||||
@ -146,10 +146,7 @@ int sasa_add(Sasahyou *sasahyou, const char *path) {
|
||||
}
|
||||
|
||||
int sasa_rem(Sasahyou *sasahyou, uint64_t sasa_id) {
|
||||
if (sasa_id == HOLE_ID) {
|
||||
return 1;
|
||||
}
|
||||
if (sasa_id >= sasahyou->size) {
|
||||
if (sasa_id == HOLE_ID || sasa_id >= sasahyou->size) {
|
||||
return 1;
|
||||
}
|
||||
if (sasahyou->database[sasa_id].id == HOLE_ID) {
|
||||
|
||||
@ -104,10 +104,7 @@ int shoppyou_dump(Shoppyou *shoppyou, const char *path) {
|
||||
}
|
||||
|
||||
int kazari_add(Shoppyou *shoppyou, uint64_t sasa_id, uint64_t tanzaku_id) {
|
||||
if (sasa_id == HOLE_ID || tanzaku_id == HOLE_ID) {
|
||||
return 1;
|
||||
}
|
||||
if (shoppyou->size == -1 && shoppyou->hole_cnt == 0) {
|
||||
if (sasa_id == HOLE_ID || tanzaku_id == HOLE_ID || shoppyou->size == -1 && shoppyou->hole_cnt == 0) {
|
||||
return 1;
|
||||
}
|
||||
Kazari newbie;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user