diff --git a/lix/libstore/build-result.hh b/lix/libstore/build-result.hh index ef7e64982..ba48dbba0 100644 --- a/lix/libstore/build-result.hh +++ b/lix/libstore/build-result.hh @@ -21,7 +21,7 @@ struct BuildResult * Therefore, don't remove status codes, and only add new status * codes at the end of the list. */ - enum Status { + enum Status : uint8_t { Built = 0, Substituted, AlreadyValid, diff --git a/lix/libstore/gc-store.hh b/lix/libstore/gc-store.hh index 121c00ceb..7d04ae6a4 100644 --- a/lix/libstore/gc-store.hh +++ b/lix/libstore/gc-store.hh @@ -39,13 +39,13 @@ struct GCOptions * Any that could not be deleted are returned via the * `kept` field of GCResults. */ - typedef enum { + enum GCAction : uint8_t { gcReturnLive, gcReturnDead, gcDeleteDead, gcDeleteSpecific, gcTryDeleteSpecific, - } GCAction; + }; GCAction action{gcDeleteDead}; diff --git a/lix/libutil/error.hh b/lix/libutil/error.hh index f1b9c29a2..2e1d8dfee 100644 --- a/lix/libutil/error.hh +++ b/lix/libutil/error.hh @@ -35,8 +35,7 @@ namespace nix { - -typedef enum { +enum Verbosity : uint8_t { lvlError = 0, lvlWarn, lvlNotice, @@ -45,7 +44,7 @@ typedef enum { lvlChatty, lvlDebug, lvlVomit -} Verbosity; +}; template<> struct json::is_integral_enum : std::true_type {};