mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-11 13:36:13 +03:00
AK: Add nodiscard
attribute to BitCast functions
This commit is contained in:
parent
84d9e537cd
commit
97d966d25c
Notes:
sideshowbarker
2024-07-17 09:45:20 +09:00
Author: https://github.com/ldm5180 Commit: https://github.com/SerenityOS/serenity/commit/97d966d25c Pull-request: https://github.com/SerenityOS/serenity/pull/14395 Reviewed-by: https://github.com/linusg
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user