Added operator = implementations to template classes.
This commit is contained in:
@@ -116,6 +116,13 @@ class TemplateArray : public Array, public std::vector<T>
|
||||
Array(ARRAYTYPE,DataSize,DataType),
|
||||
std::vector<T>(first,last) {}
|
||||
|
||||
TemplateArray& operator = (const TemplateArray& array)
|
||||
{
|
||||
if (this==&array) return *this;
|
||||
assign(array.begin(),array.end());
|
||||
return *this;
|
||||
}
|
||||
|
||||
virtual Object* cloneType() const { return new TemplateArray(); }
|
||||
virtual Object* clone(const CopyOp& copyop) const { return new TemplateArray(*this,copyop); }
|
||||
|
||||
@@ -187,6 +194,13 @@ class TemplateIndexArray : public IndexArray, public std::vector<T>
|
||||
IndexArray(ARRAYTYPE,DataSize,DataType),
|
||||
std::vector<T>(first,last) {}
|
||||
|
||||
TemplateIndexArray& operator = (const TemplateIndexArray& array)
|
||||
{
|
||||
if (this==&array) return *this;
|
||||
assign(array.begin(),array.end());
|
||||
return *this;
|
||||
}
|
||||
|
||||
virtual Object* cloneType() const { return new TemplateIndexArray(); }
|
||||
virtual Object* clone(const CopyOp& copyop) const { return new TemplateIndexArray(*this,copyop); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user