packagefs: Rename isNewest to overridesHead.

As pointed out by Adrien. Thanks for the review!

Also fixed missing dereference operators.
This commit is contained in:
Augustin Cavalier 2018-08-06 23:46:24 -04:00
parent 023a547dc6
commit 247f2fb691
2 changed files with 4 additions and 5 deletions

View File

@ -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

View File

@ -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 {