Skip to content

Commit

Permalink
change pianoroll init methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Yikai-Liao committed Aug 25, 2024
1 parent 1af190b commit 5820b11
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/pianoroll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ TrackPianoroll::TrackPianoroll(size_t modeDim, size_t pitchDim, size_t timeDim)
this->modeDim = modeDim;
this->pitchDim = pitchDim;
this->timeDim = timeDim;
this->dataPtr = new pianoroll_t[modeDim * pitchDim * timeDim];

this->clear();
this->dataPtr = new pianoroll_t[modeDim * pitchDim * timeDim]();
// this->clear();
};

TrackPianoroll::~TrackPianoroll() { delete this->dataPtr; };
Expand Down Expand Up @@ -92,9 +91,8 @@ ScorePianoroll::ScorePianoroll(size_t modeDim, size_t trackDim, size_t pitchDim,
this->trackDim = trackDim;
this->pitchDim = pitchDim;
this->timeDim = timeDim;
this->dataPtr = new pianoroll_t[modeDim * trackDim * pitchDim * timeDim];

this->clear();
this->dataPtr = new pianoroll_t[modeDim * trackDim * pitchDim * timeDim]();
// this->clear();
};

ScorePianoroll::~ScorePianoroll() { delete this->dataPtr; };
Expand Down

0 comments on commit 5820b11

Please sign in to comment.