mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 00:50:22 +00: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
1 changed files with 1 additions and 1 deletions
|
@ -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 a new issue