Skip to content

Commit

Permalink
DRAGONAGE2: Use PtrVector for the room models
Browse files Browse the repository at this point in the history
  • Loading branch information
DrMcCoy committed Oct 26, 2016
1 parent acf7c17 commit c929073
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
6 changes: 1 addition & 5 deletions src/engines/dragonage2/room.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ Room::Room(const Aurora::GFF4Struct &room) {
}

Room::~Room() {
hide();
clean();
}

Expand All @@ -73,11 +74,6 @@ int32 Room::getID() const {

void Room::clean() {
try {
hide();

for (Models::iterator m = _models.begin(); m != _models.end(); ++m)
delete *m;

deindexResources(_resources);
} catch (...) {
}
Expand Down
3 changes: 2 additions & 1 deletion src/engines/dragonage2/room.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

#include <vector>

#include "src/common/ptrvector.h"
#include "src/common/ustring.h"

#include "src/aurora/types.h"
Expand All @@ -50,7 +51,7 @@ class Room {
void hide();

private:
typedef std::vector<Graphics::Aurora::Model *> Models;
typedef Common::PtrVector<Graphics::Aurora::Model> Models;

int32 _id;

Expand Down

0 comments on commit c929073

Please sign in to comment.