[haiku-commits] r42341 - haiku/trunk/src/apps/debugger/value/value_nodes

  • From: axeld@xxxxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 29 Jun 2011 20:17:24 +0200 (CEST)

Author: axeld
Date: 2011-06-29 20:17:24 +0200 (Wed, 29 Jun 2011)
New Revision: 42341
Changeset: https://dev.haiku-os.org/changeset/42341

Modified:
   haiku/trunk/src/apps/debugger/value/value_nodes/BMessageValueNode.cpp
Log:
* Fixed GCC2 build.
* Minor cleanup.


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


Other related posts: