]> git.lizzy.rs Git - irrlicht.git/commitdiff
Sort out two -Wdeprecated-copy warnings
authorsfan5 <sfan5@live.de>
Thu, 28 Apr 2022 19:16:10 +0000 (21:16 +0200)
committersfan5 <sfan5@live.de>
Thu, 28 Apr 2022 19:20:42 +0000 (21:20 +0200)
- SMaterial copy constructor is removed entirely
  (same change in upstream trunk r6362)
- CMatrix4 gets an explicit, but default copy constructor readded

include/SMaterial.h
include/matrix4.h

index 55be84abc1ca3237d4c6c7111eef0d50cb60d5c3..43dadb6e25128932754bf542a1012c6968959b9c 100644 (file)
@@ -301,16 +301,6 @@ namespace video
                        FogEnable(false), NormalizeNormals(false), UseMipMaps(true)\r
                { }\r
 \r
-               //! Copy constructor\r
-               /** \param other Material to copy from. */\r
-               SMaterial(const SMaterial& other)\r
-               {\r
-                       // These pointers are checked during assignment\r
-                       for (u32 i=0; i<MATERIAL_MAX_TEXTURES; ++i)\r
-                               TextureLayer[i].TextureMatrix = 0;\r
-                       *this = other;\r
-               }\r
-\r
                //! Texture layer array.\r
                SMaterialLayer TextureLayer[MATERIAL_MAX_TEXTURES];\r
 \r
index cd03c44f9867683e9f384addb49535f785df6c3e..c41097375e726a7f4fd8758ec9d599bb9ccb83dc 100644 (file)
@@ -102,6 +102,9 @@ namespace core
                        //! Simple operator for linearly accessing every element of the matrix.\r
                        const T& operator[](u32 index) const { return M[index]; }\r
 \r
+                       //! Sets this matrix equal to the other matrix.\r
+                       CMatrix4<T>& operator=(const CMatrix4<T> &other) = default;\r
+\r
                        //! Sets all elements of this matrix to the value.\r
                        inline CMatrix4<T>& operator=(const T& scalar);\r
 \r