Revert "Merge branch 'add_assignment_operator' of https://github.com/andreasbuhr/GoldenCheetah into andreasbuhr-add_assignment_operator"

This reverts commit 4e09cd0717, reversing
changes made to 0c4107d78b.
This commit is contained in:
Alejandro Martinez
2024-02-05 17:53:06 -03:00
parent f2291f4522
commit 81fc763a4f
4 changed files with 2 additions and 23 deletions

View File

@@ -49,16 +49,6 @@ public:
: position(OnlyOneSegment), selectedPosition(NotAdjacent) { } : position(OnlyOneSegment), selectedPosition(NotAdjacent) { }
QtStyleOptionSegmentControlSegment(const QtStyleOptionSegmentControlSegment &other) QtStyleOptionSegmentControlSegment(const QtStyleOptionSegmentControlSegment &other)
: QStyleOption(Version, Type) { *this = other; } : QStyleOption(Version, Type) { *this = other; }
QtStyleOptionSegmentControlSegment& operator=(const QtStyleOptionSegmentControlSegment &other)
{
QStyleOption::operator=(other);
text = other.text;
icon = other.icon;
iconSize = other.iconSize;
position = other.position;
selectedPosition = other.selectedPosition;
return *this;
}
protected: protected:
QtStyleOptionSegmentControlSegment(int version); QtStyleOptionSegmentControlSegment(int version);

View File

@@ -41,15 +41,11 @@ public:
for (int i = 0; i<MAX_MEASURES; i++) values[i] = 0.0; for (int i = 0; i<MAX_MEASURES; i++) values[i] = 0.0;
} }
Measure(const Measure &other) { Measure(const Measure &other) {
*this = other;
}
Measure& operator=(const Measure &other) {
this->when = other.when; this->when = other.when;
this->comment = other.comment; this->comment = other.comment;
this->source = other.source; this->source = other.source;
this->originalSource = other.originalSource; this->originalSource = other.originalSource;
for (int i = 0; i<MAX_MEASURES; i++) this->values[i] = other.values[i]; for (int i = 0; i<MAX_MEASURES; i++) this->values[i] = other.values[i];
return *this;
} }
~Measure() {} ~Measure() {}

View File

@@ -41,7 +41,6 @@ public:
v3(double a, double b, double c) : m_t(a, b, c) {}; v3(double a, double b, double c) : m_t(a, b, c) {};
v3(const v3& o) : m_t(o.m_t) {} v3(const v3& o) : m_t(o.m_t) {}
v3& operator=(const v3& o) { m_t = o.m_t; return *this; }
double x() const { return std::get<0>(m_t); } double x() const { return std::get<0>(m_t); }
double y() const { return std::get<1>(m_t); } double y() const { return std::get<1>(m_t); }

View File

@@ -572,17 +572,13 @@ public:
string[i]=""; string[i]="";
} }
} }
XDataPoint(const XDataPoint &other) { XDataPoint (const XDataPoint &other) {
*this = other;
}
XDataPoint& operator=(const XDataPoint &other) {
this->secs=other.secs; this->secs=other.secs;
this->km=other.km; this->km=other.km;
for(int i=0; i<XDATA_MAXVALUES; i++) { for(int i=0; i<XDATA_MAXVALUES; i++) {
this->number[i]= other.number[i]; this->number[i]= other.number[i];
this->string[i]= other.string[i]; this->string[i]= other.string[i];
} }
return *this;
} }
double secs, km; double secs, km;
@@ -593,8 +589,7 @@ public:
class XDataSeries { class XDataSeries {
public: public:
XDataSeries() {} XDataSeries() {}
XDataSeries(const XDataSeries& other) { *this = other; } XDataSeries(XDataSeries &other) {
XDataSeries& operator=(const XDataSeries &other) {
name = other.name; name = other.name;
valuename = other.valuename; valuename = other.valuename;
unitname = other.unitname; unitname = other.unitname;
@@ -604,7 +599,6 @@ public:
foreach (XDataPoint *p, other.datapoints) { foreach (XDataPoint *p, other.datapoints) {
datapoints.push_back(new XDataPoint(*p)); datapoints.push_back(new XDataPoint(*p));
} }
return *this;
} }
~XDataSeries() { foreach(XDataPoint *p, datapoints) delete p; } ~XDataSeries() { foreach(XDataPoint *p, datapoints) delete p; }