Removes some unnecessary branching checks

It doesn't actually matter if the invalid node has has its linked list nodes changed
Faster to just set than to check while in a tight loop
This commit is contained in:
Ryan Houdek committed 2021-04-26 23:48:22 -07:00
1 parent c3ad571062
commit 37108058d1
1 file changed
-2
-2
View File
@@ -240,13 +240,11 @@ class OrderedNode final {
}
static void SetPrevious(uintptr_t Base, value_type Node, value_type New) {
if (Node.NodeOffset == 0) return;
OrderedNode *RealNode = Node.GetNode(Base);
RealNode->Header.Previous = New;
}
static void SetNext(uintptr_t Base, value_type Node, value_type New) {
if (Node.NodeOffset == 0) return;
OrderedNode *RealNode = Node.GetNode(Base);
RealNode->Header.Next = New;
}