Browse Source

GCC 4.4 compatibility: cannot default some move constructors.

I don't know why.
Vladimír Vondruš 13 years ago
parent
commit
fe243504a7
  1. 3
      src/Trade/AbstractMaterialData.cpp
  2. 2
      src/Trade/AbstractMaterialData.h
  3. 3
      src/Trade/MeshObjectData2D.cpp
  4. 2
      src/Trade/MeshObjectData2D.h
  5. 3
      src/Trade/MeshObjectData3D.cpp
  6. 2
      src/Trade/MeshObjectData3D.h
  7. 3
      src/Trade/ObjectData2D.cpp
  8. 3
      src/Trade/ObjectData3D.cpp
  9. 3
      src/Trade/SceneData.cpp
  10. 5
      src/Trade/TextureData.h

3
src/Trade/AbstractMaterialData.cpp

@ -32,6 +32,9 @@ AbstractMaterialData::AbstractMaterialData(Type type): _type(type) {}
AbstractMaterialData::~AbstractMaterialData() {} AbstractMaterialData::~AbstractMaterialData() {}
/* GCC 4.4 doesn't like it defaulted */
AbstractMaterialData::AbstractMaterialData(AbstractMaterialData&& other): _type(other._type) {}
/* GCC 4.5 doesn't like it defaulted */ /* GCC 4.5 doesn't like it defaulted */
AbstractMaterialData& AbstractMaterialData::operator=(AbstractMaterialData&& other) { AbstractMaterialData& AbstractMaterialData::operator=(AbstractMaterialData&& other) {
std::swap(_type, other._type); std::swap(_type, other._type);

2
src/Trade/AbstractMaterialData.h

@ -58,7 +58,7 @@ class MAGNUM_EXPORT AbstractMaterialData {
AbstractMaterialData(const AbstractMaterialData&) = delete; AbstractMaterialData(const AbstractMaterialData&) = delete;
/** @brief Move constructor */ /** @brief Move constructor */
AbstractMaterialData(AbstractMaterialData&&) = default; AbstractMaterialData(AbstractMaterialData&&);
/** @brief Copying is not allowed */ /** @brief Copying is not allowed */
AbstractMaterialData& operator=(const AbstractMaterialData&) = delete; AbstractMaterialData& operator=(const AbstractMaterialData&) = delete;

3
src/Trade/MeshObjectData2D.cpp

@ -28,6 +28,9 @@ namespace Magnum { namespace Trade {
MeshObjectData2D::MeshObjectData2D(std::vector<UnsignedInt> children, const Matrix3& transformation, UnsignedInt instance, UnsignedInt material): ObjectData2D(std::move(children), transformation, InstanceType::Mesh, instance), _material(material) {} MeshObjectData2D::MeshObjectData2D(std::vector<UnsignedInt> children, const Matrix3& transformation, UnsignedInt instance, UnsignedInt material): ObjectData2D(std::move(children), transformation, InstanceType::Mesh, instance), _material(material) {}
/* GCC 4.4 doesn't like it defaulted */
MeshObjectData2D::MeshObjectData2D(MeshObjectData2D&& other): ObjectData2D(std::move(other)), _material(other._material) {}
/* GCC 4.5 doesn't like it defaulted */ /* GCC 4.5 doesn't like it defaulted */
MeshObjectData2D& MeshObjectData2D::operator=(MeshObjectData2D&& other) { MeshObjectData2D& MeshObjectData2D::operator=(MeshObjectData2D&& other) {
ObjectData2D::operator=(std::move(other)); ObjectData2D::operator=(std::move(other));

2
src/Trade/MeshObjectData2D.h

@ -55,7 +55,7 @@ class MAGNUM_EXPORT MeshObjectData2D: public ObjectData2D {
MeshObjectData2D(const MeshObjectData2D&) = delete; MeshObjectData2D(const MeshObjectData2D&) = delete;
/** @brief Move constructor */ /** @brief Move constructor */
MeshObjectData2D(MeshObjectData2D&&) = default; MeshObjectData2D(MeshObjectData2D&&);
/** @brief Copying is not allowed */ /** @brief Copying is not allowed */
MeshObjectData2D& operator=(const MeshObjectData2D&) = delete; MeshObjectData2D& operator=(const MeshObjectData2D&) = delete;

3
src/Trade/MeshObjectData3D.cpp

@ -28,6 +28,9 @@ namespace Magnum { namespace Trade {
MeshObjectData3D::MeshObjectData3D(std::vector<UnsignedInt> children, const Matrix4& transformation, UnsignedInt instance, UnsignedInt material): ObjectData3D(std::move(children), transformation, InstanceType::Mesh, instance), _material(material) {} MeshObjectData3D::MeshObjectData3D(std::vector<UnsignedInt> children, const Matrix4& transformation, UnsignedInt instance, UnsignedInt material): ObjectData3D(std::move(children), transformation, InstanceType::Mesh, instance), _material(material) {}
/* GCC 4.4 doesn't like it defaulted */
MeshObjectData3D::MeshObjectData3D(MeshObjectData3D&& other): ObjectData3D(std::move(other)), _material(other._material) {}
/* GCC 4.5 doesn't like it defaulted */ /* GCC 4.5 doesn't like it defaulted */
MeshObjectData3D& MeshObjectData3D::operator=(MeshObjectData3D&& other) { MeshObjectData3D& MeshObjectData3D::operator=(MeshObjectData3D&& other) {
ObjectData3D::operator=(std::move(other)); ObjectData3D::operator=(std::move(other));

2
src/Trade/MeshObjectData3D.h

@ -55,7 +55,7 @@ class MAGNUM_EXPORT MeshObjectData3D: public ObjectData3D {
MeshObjectData3D(const MeshObjectData3D&) = delete; MeshObjectData3D(const MeshObjectData3D&) = delete;
/** @brief Move constructor */ /** @brief Move constructor */
MeshObjectData3D(MeshObjectData3D&&) = default; MeshObjectData3D(MeshObjectData3D&&);
/** @brief Copying is not allowed */ /** @brief Copying is not allowed */
MeshObjectData3D& operator=(const MeshObjectData3D&) = delete; MeshObjectData3D& operator=(const MeshObjectData3D&) = delete;

3
src/Trade/ObjectData2D.cpp

@ -30,7 +30,8 @@ ObjectData2D::ObjectData2D(std::vector<UnsignedInt> children, const Matrix3& tra
ObjectData2D::ObjectData2D(std::vector<UnsignedInt> children, const Matrix3& transformation): _children(children), _transformation(transformation), _instanceType(InstanceType::Empty), _instance(-1) {} ObjectData2D::ObjectData2D(std::vector<UnsignedInt> children, const Matrix3& transformation): _children(children), _transformation(transformation), _instanceType(InstanceType::Empty), _instance(-1) {}
ObjectData2D::ObjectData2D(ObjectData2D&&) = default; /* GCC 4.4 doesn't like it defaulted */
ObjectData2D::ObjectData2D(ObjectData2D&& other): _children(std::move(other._children)), _transformation(std::move(other._transformation)), _instanceType(std::move(other._instanceType)), _instance(std::move(other._instance)) {}
ObjectData2D::~ObjectData2D() = default; ObjectData2D::~ObjectData2D() = default;

3
src/Trade/ObjectData3D.cpp

@ -30,7 +30,8 @@ ObjectData3D::ObjectData3D(std::vector<UnsignedInt> children, const Matrix4& tra
ObjectData3D::ObjectData3D(std::vector<UnsignedInt> children, const Matrix4& transformation): _children(std::move(children)), _transformation(transformation), _instanceType(InstanceType::Empty), _instance(-1) {} ObjectData3D::ObjectData3D(std::vector<UnsignedInt> children, const Matrix4& transformation): _children(std::move(children)), _transformation(transformation), _instanceType(InstanceType::Empty), _instance(-1) {}
ObjectData3D::ObjectData3D(ObjectData3D&&) = default; /* GCC 4.4 doesn't like it defaulted */
ObjectData3D::ObjectData3D(ObjectData3D&& other): _children(std::move(other._children)), _transformation(std::move(other._transformation)), _instanceType(std::move(other._instanceType)), _instance(std::move(other._instance)) {}
ObjectData3D::~ObjectData3D() = default; ObjectData3D::~ObjectData3D() = default;

3
src/Trade/SceneData.cpp

@ -28,7 +28,8 @@ namespace Magnum { namespace Trade {
SceneData::SceneData(std::vector<UnsignedInt> children2D, std::vector<UnsignedInt> children3D): _children2D(std::move(children2D)), _children3D(std::move(children3D)) {} SceneData::SceneData(std::vector<UnsignedInt> children2D, std::vector<UnsignedInt> children3D): _children2D(std::move(children2D)), _children3D(std::move(children3D)) {}
SceneData::SceneData(SceneData&&) = default; /* GCC 4.4 doesn't like it defaulted */
SceneData::SceneData(SceneData&& other): _children2D(std::move(other._children2D)), _children3D(std::move(other._children3D)) {}
/* GCC 4.5 doesn't like it defaulted */ /* GCC 4.5 doesn't like it defaulted */
SceneData& SceneData::operator=(SceneData&& other) { SceneData& SceneData::operator=(SceneData&& other) {

5
src/Trade/TextureData.h

@ -66,7 +66,7 @@ class TextureData {
TextureData(const TextureData&) = delete; TextureData(const TextureData&) = delete;
/** @brief Move constructor */ /** @brief Move constructor */
TextureData(TextureData&&) = default; TextureData(TextureData&&);
/** @brief Copying is not allowed */ /** @brief Copying is not allowed */
TextureData& operator=(const TextureData&) = delete; TextureData& operator=(const TextureData&) = delete;
@ -108,6 +108,9 @@ class TextureData {
UnsignedInt _image; UnsignedInt _image;
}; };
/* GCC 4.4 doesn't like it defaulted */
inline TextureData::TextureData(TextureData&& other): _type(other._type), _minificationFilter(other._minificationFilter), _magnificationFilter(other._magnificationFilter), _mipmapFilter(other._mipmapFilter), _wrapping(other._wrapping), _image(other._image) {}
/* GCC 4.5 doesn't like it defaulted */ /* GCC 4.5 doesn't like it defaulted */
inline TextureData& TextureData::operator=(TextureData&& other) { inline TextureData& TextureData::operator=(TextureData&& other) {
std::swap(_type, other._type); std::swap(_type, other._type);

Loading…
Cancel
Save