Commit b8037fc7 authored by Mathieu Giraud's avatar Mathieu Giraud

core/bioreader.hpp, core/fasta.cpp: remove Sequence.seq

Dead code, live memory.
See #3389.
parent 3245fcb3
......@@ -46,8 +46,6 @@ OnlineBioReader::OnlineBioReader(const string &input_filename,
}
OnlineBioReader::~OnlineBioReader() {
if (current.seq)
delete [] current.seq;
}
void OnlineBioReader::init() {
......@@ -55,7 +53,6 @@ void OnlineBioReader::init() {
nb_sequences_parsed = 0;
nb_sequences_returned = 0;
char_nb = 0;
current.seq = NULL;
current.marked_pos = 0;
current_gaps = 0;
}
......
......@@ -41,7 +41,6 @@ typedef struct read_t
string label;
string sequence; // Sequence: original string representation
string quality;
int* seq; // Sequence: seq representation
size_t marked_pos; // Some marked position in the sequence
} Sequence;
......
......@@ -78,13 +78,9 @@ void OnlineFasta::next() {
current.label.erase();
current.sequence.erase();
current.quality.erase();
if (current.seq) {
delete [] current.seq;
current.seq = NULL;
current.marked_pos = 0;
current_gaps = 0;
}
current.marked_pos = 0;
current_gaps = 0;
if (hasNextData()) {
switch(line[0]) {
case '>': state=FASTX_FASTA; break;
......@@ -137,13 +133,6 @@ void OnlineFasta::next() {
// Sequence in uppercase
transform(current.sequence.begin(), current.sequence.end(), current.sequence.begin(), (int (*)(int))toupper);
// Compute seq
current.seq = new int[current.sequence.length()];
for (unsigned int i=0; i< current.sequence.length(); i++)
{
current.seq[i] = nuc_to_int(current.sequence[i]) ;
}
} else
unexpectedEOF();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment