mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 23:20:20 +00:00
AK: Add a Checked::unchecked_value() function
This is used in Jakt.
This commit is contained in:
parent
b65258c093
commit
c547b55a00
Notes:
sideshowbarker
2024-07-17 03:26:52 +09:00
Author: https://github.com/alimpfard Commit: https://github.com/SerenityOS/serenity/commit/c547b55a00 Pull-request: https://github.com/SerenityOS/serenity/pull/16396 Reviewed-by: https://github.com/ADKaster Reviewed-by: https://github.com/awesomekling ✅
1 changed files with 5 additions and 0 deletions
|
@ -168,6 +168,11 @@ public:
|
|||
return m_value;
|
||||
}
|
||||
|
||||
ALWAYS_INLINE constexpr T value_unchecked() const
|
||||
{
|
||||
return m_value;
|
||||
}
|
||||
|
||||
constexpr void add(T other)
|
||||
{
|
||||
m_overflow |= __builtin_add_overflow(m_value, other, &m_value);
|
||||
|
|
Loading…
Reference in a new issue