packagefs: Rename isNewest to overridesHead.
As pointed out by Adrien. Thanks for the review! Also fixed missing dereference operators.
This commit is contained in:
parent
023a547dc6
commit
247f2fb691
@ -108,9 +108,9 @@ UnpackingDirectory::AddPackageNode(PackageNode* packageNode, dev_t deviceID)
|
||||
= dynamic_cast<PackageDirectory*>(packageNode);
|
||||
|
||||
PackageDirectory* other = fPackageDirectories.Head();
|
||||
bool isNewest = other == NULL || *packageDirectory > *other;
|
||||
bool overridesHead = other == NULL || *packageDirectory > *other;
|
||||
|
||||
if (isNewest) {
|
||||
if (overridesHead) {
|
||||
fPackageDirectories.Insert(other, packageDirectory);
|
||||
NodeReinitVFS(deviceID, fID, packageDirectory, other, fFlags);
|
||||
} else
|
||||
|
@ -116,10 +116,9 @@ UnpackingLeafNode::AddPackageNode(PackageNode* packageNode, dev_t deviceID)
|
||||
= dynamic_cast<PackageLeafNode*>(packageNode);
|
||||
|
||||
PackageLeafNode* headNode = fPackageNodes.Head();
|
||||
bool isNewest = headNode == NULL
|
||||
|| packageLeafNode > headNode;
|
||||
bool overridesHead = headNode == NULL || *packageLeafNode > *headNode;
|
||||
|
||||
if (isNewest) {
|
||||
if (overridesHead) {
|
||||
fPackageNodes.Add(packageLeafNode);
|
||||
NodeReinitVFS(deviceID, fID, packageLeafNode, headNode, fFlags);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user