Commit 0ef046ae authored by Langella Olivier's avatar Langella Olivier
Browse files

fix implicitly declared operator= problem

parent e88ec6a8
...@@ -32,8 +32,7 @@ PeptideMatch::PeptideMatch() ...@@ -32,8 +32,7 @@ PeptideMatch::PeptideMatch()
PeptideMatch::PeptideMatch(const PeptideMatch &other) PeptideMatch::PeptideMatch(const PeptideMatch &other)
{ {
_start = other._start; this->operator=(other);
_p_peptide_evidence = other._p_peptide_evidence;
} }
bool bool
PeptideMatch::operator==(const PeptideMatch &other) const PeptideMatch::operator==(const PeptideMatch &other) const
...@@ -45,6 +44,17 @@ PeptideMatch::operator==(const PeptideMatch &other) const ...@@ -45,6 +44,17 @@ PeptideMatch::operator==(const PeptideMatch &other) const
} }
return false; return false;
} }
PeptideMatch &
PeptideMatch::operator=(const PeptideMatch &other)
{
_start = other._start;
_p_peptide_evidence = other._p_peptide_evidence;
return *this;
}
void void
PeptideMatch::setPeptideEvidenceSp(PeptideEvidenceSp sp_peptide_evidence) PeptideMatch::setPeptideEvidenceSp(PeptideEvidenceSp sp_peptide_evidence)
{ {
......
...@@ -22,8 +22,7 @@ ...@@ -22,8 +22,7 @@
*implementation *implementation
******************************************************************************/ ******************************************************************************/
#ifndef PEPTIDEMATCH_H #pragma once
#define PEPTIDEMATCH_H
#include "peptideevidence.h" #include "peptideevidence.h"
...@@ -35,6 +34,8 @@ class PeptideMatch ...@@ -35,6 +34,8 @@ class PeptideMatch
bool operator==(const PeptideMatch &other) const; bool operator==(const PeptideMatch &other) const;
PeptideMatch &operator=(const PeptideMatch &);
/** @brief set start position of this peptide inside the protein sequence /** @brief set start position of this peptide inside the protein sequence
* @param start position in the protein amino acid sequence (starts at 0) * @param start position in the protein amino acid sequence (starts at 0)
...@@ -66,5 +67,3 @@ class PeptideMatch ...@@ -66,5 +67,3 @@ class PeptideMatch
unsigned int _start = 0; unsigned int _start = 0;
PeptideEvidence *_p_peptide_evidence = nullptr; PeptideEvidence *_p_peptide_evidence = nullptr;
}; };
#endif // PEPTIDEMATCH_H
Supports Markdown
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