Remove unused PackageNodeAttribute::fParent

This commit is contained in:
Ingo Weinhold 2011-07-08 15:41:28 +02:00
parent a52387c669
commit 278925246f
3 changed files with 6 additions and 9 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
* Copyright 2009-2011, Ingo Weinhold, ingo_weinhold@gmx.de.
* Distributed under the terms of the MIT License.
*/
@ -10,11 +10,10 @@
#include <string.h>
PackageNodeAttribute::PackageNodeAttribute(PackageNode* parent, uint32 type,
PackageNodeAttribute::PackageNodeAttribute(uint32 type,
const BPackageData& data)
:
fData(data),
fParent(parent),
fName(NULL),
fType(type)
{

View File

@ -1,5 +1,5 @@
/*
* Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
* Copyright 2009-2011, Ingo Weinhold, ingo_weinhold@gmx.de.
* Distributed under the terms of the MIT License.
*/
#ifndef PACKAGE_NODE_ATTRIBUTE_H
@ -19,11 +19,10 @@ class PackageNode;
class PackageNodeAttribute
: public DoublyLinkedListLinkImpl<PackageNodeAttribute> {
public:
PackageNodeAttribute(PackageNode* parent,
uint32 type, const BPackageData& data);
PackageNodeAttribute(uint32 type,
const BPackageData& data);
~PackageNodeAttribute();
PackageNode* Parent() const { return fParent; }
const char* Name() const { return fName; }
uint32 Type() const { return fType; }
const BPackageData& Data() const { return fData; }
@ -33,7 +32,6 @@ public:
protected:
BPackageData fData;
PackageNode* fParent;
char* fName;
uint32 fType;
};

View File

@ -263,7 +263,7 @@ struct Volume::PackageLoaderContentHandler : BPackageContentHandler {
PackageNode* node = (PackageNode*)entry->UserToken();
PackageNodeAttribute* nodeAttribute = new(std::nothrow)
PackageNodeAttribute(node, attribute->Type(), attribute->Data());
PackageNodeAttribute(attribute->Type(), attribute->Data());
if (nodeAttribute == NULL)
RETURN_ERROR(B_NO_MEMORY)