Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename states into better names #3

Open
ikskuh opened this issue Mar 19, 2023 · 0 comments
Open

Rename states into better names #3

ikskuh opened this issue Mar 19, 2023 · 0 comments

Comments

@ikskuh
Copy link

ikskuh commented Mar 19, 2023

if (state == SHACK_UNOBSERVED)
return "unobserved";
if (state == SHACK_OPEN)
return "open";
if (state == SHACK_UNLOCKED_VIA_B2)
return "unlocked via b2";
if (state == SHACK_UNLOCKED_VIA_C2)
return "unlocked via c2";
if (state == SHACK_LOCKED)
return "locked";
return "<<INVALID>>";

State Old Name New Name
SHACK_UNOBSERVED "unobserved" "unobserved"
SHACK_OPEN "open" "open for public"
SHACK_UNLOCKED_VIA_B2 "unlocked via b2" "not locked because b2 is unlocked"
SHACK_UNLOCKED_VIA_C2 "unlocked via c2" "not locked because c2 is unlocked"
SHACK_LOCKED "locked" "locked"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant