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);
|
= dynamic_cast<PackageDirectory*>(packageNode);
|
||||||
|
|
||||||
PackageDirectory* other = fPackageDirectories.Head();
|
PackageDirectory* other = fPackageDirectories.Head();
|
||||||
bool isNewest = other == NULL || *packageDirectory > *other;
|
bool overridesHead = other == NULL || *packageDirectory > *other;
|
||||||
|
|
||||||
if (isNewest) {
|
if (overridesHead) {
|
||||||
fPackageDirectories.Insert(other, packageDirectory);
|
fPackageDirectories.Insert(other, packageDirectory);
|
||||||
NodeReinitVFS(deviceID, fID, packageDirectory, other, fFlags);
|
NodeReinitVFS(deviceID, fID, packageDirectory, other, fFlags);
|
||||||
} else
|
} else
|
||||||
|
@ -116,10 +116,9 @@ UnpackingLeafNode::AddPackageNode(PackageNode* packageNode, dev_t deviceID)
|
|||||||
= dynamic_cast<PackageLeafNode*>(packageNode);
|
= dynamic_cast<PackageLeafNode*>(packageNode);
|
||||||
|
|
||||||
PackageLeafNode* headNode = fPackageNodes.Head();
|
PackageLeafNode* headNode = fPackageNodes.Head();
|
||||||
bool isNewest = headNode == NULL
|
bool overridesHead = headNode == NULL || *packageLeafNode > *headNode;
|
||||||
|| packageLeafNode > headNode;
|
|
||||||
|
|
||||||
if (isNewest) {
|
if (overridesHead) {
|
||||||
fPackageNodes.Add(packageLeafNode);
|
fPackageNodes.Add(packageLeafNode);
|
||||||
NodeReinitVFS(deviceID, fID, packageLeafNode, headNode, fFlags);
|
NodeReinitVFS(deviceID, fID, packageLeafNode, headNode, fFlags);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user