Skip to content

Commit

Permalink
flags: Implemented a function for setting the value of a flags field …
Browse files Browse the repository at this point in the history
…from a raw value
  • Loading branch information
dragonmux committed Feb 14, 2025
1 parent b64e714 commit 8e8d477
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions substrate/flags
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ namespace substrate
}

[[nodiscard]] constexpr auto toRaw() const noexcept { return value; }
constexpr void fromRaw(const storage_t &flags) { value = flags; }

constexpr bool operator ==(const bitFlags_t &flags) const noexcept { return value == flags.value; }
constexpr bool operator ==(const enum_t flag) const noexcept { return value == flagAsBit(flag); }
Expand Down

0 comments on commit 8e8d477

Please sign in to comment.