Skip to content

Commit

Permalink
AURORA: Use PtrVector in the CDPTH ReadContext
Browse files Browse the repository at this point in the history
  • Loading branch information
DrMcCoy committed Oct 26, 2016
1 parent 0fc8a8c commit b54c876
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/aurora/cdpth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

#include "src/common/util.h"
#include "src/common/scopedptr.h"
#include "src/common/ptrvector.h"
#include "src/common/error.h"
#include "src/common/readstream.h"

Expand All @@ -34,7 +35,7 @@

namespace Aurora {

typedef std::vector<Common::SeekableReadStream *> Cells;
typedef Common::PtrVector<Common::SeekableReadStream> Cells;

struct ReadContext {
Common::SeekableReadStream *cdpth;
Expand All @@ -49,11 +50,6 @@ struct ReadContext {
ReadContext(Common::SeekableReadStream &c, uint32 w, uint32 h) :
cdpth(&c), width(w), height(h) {
}

~ReadContext() {
for (Cells::iterator c = cells.begin(); c != cells.end(); ++c)
delete *c;
}
};

static void loadCDPTH(ReadContext &ctx);
Expand Down

0 comments on commit b54c876

Please sign in to comment.