Skip to content

Commit 8e8d477

Browse files
committed
flags: Implemented a function for setting the value of a flags field from a raw value
1 parent b64e714 commit 8e8d477

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

substrate/flags

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ namespace substrate
7777
}
7878

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

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

0 commit comments

Comments
 (0)