Skip to content

Commit

Permalink
NWN2: Use PtrList for the TRX parts
Browse files Browse the repository at this point in the history
  • Loading branch information
DrMcCoy committed Oct 26, 2016
1 parent d391dae commit 85bed3e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
5 changes: 0 additions & 5 deletions src/engines/nwn2/trxfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,6 @@ TRXFile::TRXFile(const Common::UString &resRef) : _visible(false) {

TRXFile::~TRXFile() {
hide();

for (ObjectList::iterator t = _terrain.begin(); t != _terrain.end(); ++t)
delete *t;
for (ObjectList::iterator w = _water.begin(); w != _water.end(); ++w)
delete *w;
}

void TRXFile::show() {
Expand Down
3 changes: 2 additions & 1 deletion src/engines/nwn2/trxfile.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include <vector>

#include "src/common/types.h"
#include "src/common/ptrlist.h"

namespace Common {
class UString;
Expand Down Expand Up @@ -78,7 +79,7 @@ class TRXFile {
uint32 size; ///< Size of the packet.
};

typedef std::list<Graphics::Aurora::GeometryObject *> ObjectList;
typedef Common::PtrList<Graphics::Aurora::GeometryObject> ObjectList;


bool _visible;
Expand Down

0 comments on commit 85bed3e

Please sign in to comment.