AK: Add nodiscard attribute to BitCast functions

This commit is contained in:
Lenny Maiorani 2022-06-26 10:20:52 -06:00 committed by Brian Gianforcaro
parent 84d9e537cd
commit 97d966d25c
Notes: sideshowbarker 2024-07-17 09:45:20 +09:00

View file

@ -9,7 +9,7 @@
namespace AK {
template<typename T, typename U>
inline T bit_cast(const U& a)
[[nodiscard]] inline T bit_cast(const U& a)
{
#if (__has_builtin(__builtin_bit_cast))
return __builtin_bit_cast(T, a);