mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 23:20:20 +00:00
IntrusiveRedBlackTree: Remove redundant subtraction of 0
Problem: - ToT clang will not build due to casting `nullptr` to `u8*`. This is redundant because it casts to get a `0` then subtracts it. Solution: - Remove it since subtracting `0` doesn't do anything.
This commit is contained in:
parent
15f95220ae
commit
077e78a8d7
Notes:
sideshowbarker
2024-07-18 07:02:07 +09:00
Author: https://github.com/ldm5180 Commit: https://github.com/SerenityOS/serenity/commit/077e78a8d72 Pull-request: https://github.com/SerenityOS/serenity/pull/9364 Reviewed-by: https://github.com/alimpfard
1 changed files with 1 additions and 1 deletions
|
@ -143,7 +143,7 @@ private:
|
|||
|
||||
static V* node_to_value(TreeNode& node)
|
||||
{
|
||||
return (V*)((u8*)&node - ((u8*)&(((V*)nullptr)->*member) - (u8*)nullptr));
|
||||
return bit_cast<V*>(bit_cast<u8*>(&node) - bit_cast<u8*>(member));
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue