Commit 4b338279 authored by Carsten Kemena's avatar Carsten Kemena

change sequence to return const reference

parent 561274a5
......@@ -965,7 +965,7 @@ SequenceSet<SequenceType>::_readPhylip(AlgorithmPack::Input &inF, std::map<std::
size_t firstId = sequences_.size();
std::string name="", seq;
size_t currentLength=seqLength;
SequenceType *currentSeq;
SequenceType *currentSeq = nullptr;
if (isSequential)
{
while (getline(inF, line))
......@@ -982,16 +982,12 @@ SequenceSet<SequenceType>::_readPhylip(AlgorithmPack::Input &inF, std::map<std::
{
if (it != it_end)
++it->second;
//currentSeq = SequencePtr(new SequenceType(name, seqLength, "", "", ++seqId));
//currentSeq->append(seq);
//sequences_.push_back(currentSeq);
sequences_.emplace_back(name, seqLength, "", "", ++seqId);
currentSeq = &sequences_[sequences_.size()-1];
currentSeq->append(seq);
}
else
currentSeq = NULL;//.reset();
currentSeq = nullptr;
}
else
{
......@@ -1022,12 +1018,9 @@ SequenceSet<SequenceType>::_readPhylip(AlgorithmPack::Input &inF, std::map<std::
sequences_.emplace_back(name, seqLength, "", "", ++seqId);
currentSeq = &sequences_[sequences_.size()-1];
currentSeq->append(seq);
/*currentSeq = SequencePtr(new SequenceType(name, seqLength, "", "", ++seqId));
currentSeq->append(seq);
sequences_.push_back(currentSeq);*/
}
else
currentSeq = NULL;//.reset();
currentSeq = NULL;
}
// read rest of file
......
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