* Fixed GCC2 build.

* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42341 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2011-06-29 18:17:24 +00:00
parent 961a96a987
commit e416dbbd1b

View File

@ -173,7 +173,7 @@ BMessageValueNode::ResolvedLocationAndValue(ValueLoader* valueLoader,
if (error != B_OK) { if (error != B_OK) {
TRACE_LOCALS("BMessageValueNode::ResolvedLocationAndValue(): " TRACE_LOCALS("BMessageValueNode::ResolvedLocationAndValue(): "
"failed to resolve location of header member: %s\n", "failed to resolve location of header member: %s\n",
strerror(error)); strerror(error));
delete memberLocation; delete memberLocation;
return error; return error;
} }
@ -300,14 +300,14 @@ BMessageValueNode::CreateChildren()
if (!fChildren.IsEmpty()) if (!fChildren.IsEmpty())
return B_OK; return B_OK;
Type* whatType = NULL;
CompoundType* baseType = dynamic_cast<CompoundType*>( CompoundType* baseType = dynamic_cast<CompoundType*>(
fType->ResolveRawType(false)); fType->ResolveRawType(false));
if (baseType == NULL) if (baseType == NULL)
return B_OK; return B_OK;
DataMember* member; DataMember* member = NULL;
Type* whatType = NULL;
for (int32 i = 0; i < baseType->CountDataMembers(); i++) { for (int32 i = 0; i < baseType->CountDataMembers(); i++) {
member = baseType->DataMemberAt(i); member = baseType->DataMemberAt(i);
if (strcmp(member->Name(), "what") == 0) { if (strcmp(member->Name(), "what") == 0) {
@ -316,8 +316,8 @@ BMessageValueNode::CreateChildren()
} }
} }
ValueNodeChild* whatNode = ValueNodeChild* whatNode
new(std::nothrow) BMessageWhatNodeChild(this, member, whatType); = new(std::nothrow) BMessageWhatNodeChild(this, member, whatType);
if (whatNode == NULL) if (whatNode == NULL)
return B_NO_MEMORY; return B_NO_MEMORY;
@ -328,8 +328,8 @@ BMessageValueNode::CreateChildren()
type_code type; type_code type;
int32 count; int32 count;
for (int32 i = 0; for (int32 i = 0;
fMessage.GetInfo(B_ANY_TYPE, i, &name, &type, fMessage.GetInfo(B_ANY_TYPE, i, &name, &type, &count) == B_OK;
&count) == B_OK; i++) { i++) {
// TODO: split FieldHeaderNode into two variants in order to // TODO: split FieldHeaderNode into two variants in order to
// present fields with a count of 1 without subindices. // present fields with a count of 1 without subindices.
BMessageFieldHeaderNodeChild* node = new(std::nothrow) BMessageFieldHeaderNodeChild* node = new(std::nothrow)
@ -484,8 +484,7 @@ BMessageValueNode::BMessageFieldHeaderNodeChild::CreateInternalNode(
ValueNode*& _node) ValueNode*& _node)
{ {
BMessageFieldHeaderNode* node = new(std::nothrow) BMessageFieldHeaderNode* node = new(std::nothrow)
BMessageFieldHeaderNode(this, fParent, fName, fFieldType, BMessageFieldHeaderNode(this, fParent, fName, fFieldType, fFieldCount);
fFieldCount);
if (node == NULL) if (node == NULL)
return B_NO_MEMORY; return B_NO_MEMORY;