Procházet zdrojové kódy

Apply suggestions from code review

* make the copy constructors explicitly defaulted
* split compound assert

Martin Jeřábek před 6 roky
rodič
revize
4f767ecd13

+ 2 - 1
include/assimp/MemoryIOWrapper.h

@@ -80,7 +80,8 @@ public:
     // -------------------------------------------------------------------
     // Read from stream
     size_t Read(void* pvBuffer, size_t pSize, size_t pCount)    {
-        ai_assert(pvBuffer && pSize);
+        ai_assert(pvBuffer);
+        ai_assert(pSize);
         const size_t cnt = std::min(pCount,(length-pos)/pSize), ofs = pSize*cnt;
 
         memcpy(pvBuffer,buffer+pos,ofs);

+ 1 - 1
include/assimp/color4.h

@@ -63,7 +63,7 @@ public:
     aiColor4t (TReal _r, TReal _g, TReal _b, TReal _a)
         : r(_r), g(_g), b(_b), a(_a) {}
     explicit aiColor4t (TReal _r) : r(_r), g(_r), b(_r), a(_r) {}
-    // aiColor4t (const aiColor4t& o) = default;
+    aiColor4t (const aiColor4t& o) = default;
 
 public:
     // combined operators

+ 1 - 1
include/assimp/vector2.h

@@ -69,7 +69,7 @@ public:
     aiVector2t () : x(), y() {}
     aiVector2t (TReal _x, TReal _y) : x(_x), y(_y) {}
     explicit aiVector2t (TReal _xyz) : x(_xyz), y(_xyz) {}
-    // aiVector2t (const aiVector2t& o) = default;
+    aiVector2t (const aiVector2t& o) = default;
 
 public:
 

+ 1 - 1
include/assimp/vector3.h

@@ -69,7 +69,7 @@ public:
     aiVector3t() AI_NO_EXCEPT : x(), y(), z() {}
     aiVector3t(TReal _x, TReal _y, TReal _z) : x(_x), y(_y), z(_z) {}
     explicit aiVector3t (TReal _xyz ) : x(_xyz), y(_xyz), z(_xyz) {}
-    // aiVector3t( const aiVector3t& o ) = default;
+    aiVector3t( const aiVector3t& o ) = default;
 
 public: