mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:37:46 +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
1 changed files with 1 additions and 1 deletions
|
@ -143,7 +143,7 @@ private:
|
||||||
|
|
||||||
static V* node_to_value(TreeNode& node)
|
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…
Add table
Add a link
Reference in a new issue