Commit 9f89e8a0 authored by Martin Heistermann's avatar Martin Heistermann

Fix some -Wdeprecated-copy warnings.

Replace trivial assignment operators and copy constructors by explicit default methods.
parent 7b23318e
......@@ -466,6 +466,8 @@ class DLLEXPORT ObjectIterator {
/// additional constructor starting at a given position
ObjectIterator(BaseObjectData* pos, IteratorRestriction _restriction = ALL_OBJECTS , DataType _dataType = DATA_ALL );
ObjectIterator(const ObjectIterator &) = default;
/// return the current position of the iterator
operator value_handle() { return pos_; };
......@@ -476,7 +478,7 @@ class DLLEXPORT ObjectIterator {
bool operator!=( const ObjectIterator& _rhs) const;
/// assign iterators
ObjectIterator& operator=( const ObjectIterator& _rhs);
ObjectIterator& operator=( const ObjectIterator&) = default;
/// dereference
pointer operator->();
......
......@@ -109,13 +109,6 @@ bool ObjectIterator::operator!=( const ObjectIterator& _rhs) const {
return ( _rhs.pos_ != pos_ );
}
ObjectIterator& ObjectIterator::operator=( const ObjectIterator& _rhs) {
pos_ = _rhs.pos_;
dataType_ = _rhs.dataType_;
restriction_ = _rhs.restriction_;
return *this;
}
ObjectIterator::pointer ObjectIterator::operator->(){
return pos_;
......
......@@ -84,7 +84,8 @@ class DLLEXPORT DataType {
public:
DataType();
DataType(const unsigned int& _i);
DataType(const DataType& _i ) = default;
bool operator!=( const unsigned int& _i ) const;
bool operator!=( const DataType& _i ) const;
......@@ -92,8 +93,9 @@ class DLLEXPORT DataType {
bool operator==( const DataType& _i ) const;
DataType& operator=( const unsigned int& _i );
DataType& operator=( const DataType& _i );
DataType& operator=( const DataType& _i ) = default;
bool operator<( const unsigned int& _i ) const;
bool operator<( const DataType& _i ) const;
......
......@@ -336,11 +336,6 @@ DataType& DataType::operator=( const unsigned int& _i ) {
return (*this);
}
DataType& DataType::operator=( const DataType& _i ) {
field = _i.field;
return (*this);
}
//===========================================
bool DataType::operator<( const unsigned int& _i ) const {
......
......@@ -68,11 +68,6 @@ UpdateType::UpdateType()
}
UpdateType::UpdateType(const UpdateType& _type)
:type_(_type.type_)
{
}
UpdateType::UpdateType(const UpdateTypeSet& _set)
: type_(_set)
......
......@@ -61,7 +61,7 @@ class DLLEXPORT UpdateType {
public:
UpdateType();
UpdateType(const UpdateType& _type);
UpdateType(const UpdateType& _type) = default;
UpdateType(const UpdateTypeSet& _set);
......
......@@ -93,9 +93,7 @@ public:
{}
/// copy constructor
inline GLMatrixT(const GLMatrixT<Scalar>& _rhs)
: Matrix4x4T<Scalar>(_rhs)
{}
inline GLMatrixT(const GLMatrixT<Scalar>& _rhs) = default;
/** setup matrix using an array of N*N scalar values.
elements are ordered 'column first' (like OpenGL) */
......
......@@ -270,14 +270,6 @@ bool DrawMode::operator==(const DrawMode& _mode) const {
//return ((modeFlags_ & _mode.modeFlags_).any());
}
DrawMode & DrawMode::operator =(const DrawMode& _mode) {
modeFlags_ = _mode.modeFlags_;
layers_ = _mode.layers_;
// checkConsistency();
return (*this);
}
bool DrawMode::operator!=( const DrawMode& _mode2 ) const {
return (modeFlags_ != _mode2.modeFlags_);
}
......
......@@ -288,8 +288,9 @@ namespace DrawModes {
class ACGDLLEXPORT DrawMode {
public:
DrawMode();
DrawMode();
DrawMode(const DrawMode &) = default;
/** \brief constructor for unsigned int.
*
* This constructor creates a DrawMode with the given drawMode index.
......@@ -323,7 +324,7 @@ namespace DrawModes {
/** @name Operators
* @{ */
//===========================================================================
DrawMode & operator = (const DrawMode& _mode );
DrawMode & operator= (const DrawMode& _mode) = default;
bool operator==(const DrawMode& _mode) const;
......
......@@ -109,28 +109,7 @@ public:
virtual ~Material() {};
/// Copy constructor
Material(const Material& _m) :
baseColor_(_m.baseColor_),
ambientColor_(_m.ambientColor_),
diffuseColor_(_m.diffuseColor_),
specularColor_(_m.specularColor_),
overlayColor_(_m.overlayColor_),
shininess_(_m.shininess_),
reflectance_(_m.reflectance_),
indexOfRefraction_(_m.indexOfRefraction_),
isRefractive_(_m.isRefractive_),
pointSize_(_m.pointSize_),
lineWidth_(_m.lineWidth_),
roundPoints_(_m.roundPoints_),
linesSmooth_(_m.linesSmooth_),
alphaTest_(_m.alphaTest_),
alphaClip_(_m.alphaClip_),
blending_(_m.blending_),
blendParam1_(_m.blendParam1_),
blendParam2_(_m.blendParam2_),
colorMaterial_(_m.colorMaterial_),
backfaceCulling_(_m.backfaceCulling_),
multiSampling_(_m.multiSampling_) {};
Material(const Material&) = default;
static bool support_json_serialization();
QString serializeToJson() const;
......
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