Update some comments after understanding things better. Some things which got
me confused were perfectly correct. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27626 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -508,17 +508,19 @@ PrimaryPartition::LogicalPartitionAt(int32 index) const
|
||||
void
|
||||
PrimaryPartition::AddLogicalPartition(LogicalPartition *partition)
|
||||
{
|
||||
if (partition) {
|
||||
partition->SetPrimaryPartition(this);
|
||||
partition->SetPrevious(fTail);
|
||||
if (fTail) {
|
||||
fTail->SetNext(partition);
|
||||
fTail = partition;
|
||||
} else
|
||||
fHead = fTail = partition;
|
||||
partition->SetNext(NULL);
|
||||
fLogicalPartitionCount++;
|
||||
}
|
||||
if (!partition)
|
||||
return;
|
||||
|
||||
partition->SetPrimaryPartition(this);
|
||||
partition->SetPrevious(fTail);
|
||||
if (fTail) {
|
||||
fTail->SetNext(partition);
|
||||
fTail = partition;
|
||||
} else
|
||||
fHead = fTail = partition;
|
||||
partition->SetNext(NULL);
|
||||
|
||||
fLogicalPartitionCount++;
|
||||
}
|
||||
|
||||
// RemoveLogicalPartition
|
||||
@@ -538,6 +540,7 @@ PrimaryPartition::RemoveLogicalPartition(LogicalPartition *partition)
|
||||
next->SetPrevious(prev);
|
||||
else
|
||||
fTail = prev;
|
||||
|
||||
fLogicalPartitionCount--;
|
||||
|
||||
partition->SetNext(NULL);
|
||||
|
||||
Reference in New Issue
Block a user