mirror of
https://github.com/SerenityOS/serenity
synced 2024-09-06 08:56:40 +00:00
AK: Add a Checked::unchecked_value() function
This is used in Jakt.
This commit is contained in:
parent
b65258c093
commit
c547b55a00
|
@ -168,6 +168,11 @@ public:
|
||||||
return m_value;
|
return m_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ALWAYS_INLINE constexpr T value_unchecked() const
|
||||||
|
{
|
||||||
|
return m_value;
|
||||||
|
}
|
||||||
|
|
||||||
constexpr void add(T other)
|
constexpr void add(T other)
|
||||||
{
|
{
|
||||||
m_overflow |= __builtin_add_overflow(m_value, other, &m_value);
|
m_overflow |= __builtin_add_overflow(m_value, other, &m_value);
|
||||||
|
|
Loading…
Reference in a new issue