Better error checking.
Style changes git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36094 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1108,21 +1108,32 @@ BShelf::operator=(const BShelf &)
|
||||
status_t
|
||||
BShelf::_Archive(BMessage *data) const
|
||||
{
|
||||
BHandler::Archive(data);
|
||||
status_t status = BHandler::Archive(data);
|
||||
if (status != B_OK)
|
||||
return status;
|
||||
|
||||
data->AddBool("_zom_dsp", DisplaysZombies());
|
||||
data->AddBool("_zom_alw", AllowsZombies());
|
||||
data->AddInt32("_sg_cnt", fGenCount);
|
||||
status = data->AddBool("_zom_dsp", DisplaysZombies());
|
||||
if (status != B_OK)
|
||||
return status;
|
||||
|
||||
status = data->AddBool("_zom_alw", AllowsZombies());
|
||||
if (status != B_OK)
|
||||
return status;
|
||||
|
||||
status = data->AddInt32("_sg_cnt", fGenCount);
|
||||
if (status != B_OK)
|
||||
return status;
|
||||
|
||||
BMessage archive('ARCV');
|
||||
|
||||
for (int32 i = 0; i < fReplicants.CountItems(); i++) {
|
||||
if (((replicant_data *)fReplicants.ItemAt(i))->Archive(&archive) == B_OK)
|
||||
data->AddMessage("replicant", &archive);
|
||||
status = data->AddMessage("replicant", &archive);
|
||||
if (status != B_OK)
|
||||
break;
|
||||
archive.MakeEmpty();
|
||||
}
|
||||
|
||||
return B_OK;
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user