Skip to content

Commit

Permalink
replaced back() and front() functions from string
Browse files Browse the repository at this point in the history
  • Loading branch information
atks committed Apr 20, 2016
1 parent 1bcc63a commit 08924c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions candidate_motif_picker.cpp
Expand Up @@ -181,14 +181,14 @@ void CandidateMotifPicker::set_motif_from_info_field(Variant& variant)
bool CandidateMotifPicker::get_indel(std::string ref, std::string alt, std::string& indel)
{
//trim right
while (ref.size()!=0 && alt.size()!=0 && ref.back()==alt.back())
while (ref.size()!=0 && alt.size()!=0 && ref.at(ref.size()-1)==alt.at(alt.size()-1))
{
ref.erase(ref.size()-1, 1);
alt.erase(alt.size()-1, 1);
}

//trim left
while (ref.size()!=0 && alt.size()!=0 && ref.front()==alt.front())
while (ref.size()!=0 && alt.size()!=0 && ref.at(0)==alt.at(0))
{
ref.erase(0, 1);
alt.erase(0, 1);
Expand Down

0 comments on commit 08924c1

Please sign in to comment.