From 4f767ecd13d1f6f6bd0406e59816ad0dcd2642b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Je=C5=99=C3=A1bek?= Date: Wed, 28 Nov 2018 14:19:46 +0100 Subject: [PATCH] Apply suggestions from code review * make the copy constructors explicitly defaulted * split compound assert --- include/assimp/MemoryIOWrapper.h | 3 ++- include/assimp/color4.h | 2 +- include/assimp/vector2.h | 2 +- include/assimp/vector3.h | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/assimp/MemoryIOWrapper.h b/include/assimp/MemoryIOWrapper.h index 54d89aa64..5260cb2b2 100644 --- a/include/assimp/MemoryIOWrapper.h +++ b/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); diff --git a/include/assimp/color4.h b/include/assimp/color4.h index 9de275af1..fddd1b638 100644 --- a/include/assimp/color4.h +++ b/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 diff --git a/include/assimp/vector2.h b/include/assimp/vector2.h index 2da60c982..68eee081f 100644 --- a/include/assimp/vector2.h +++ b/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: diff --git a/include/assimp/vector3.h b/include/assimp/vector3.h index 3bc176451..33ae7d22f 100644 --- a/include/assimp/vector3.h +++ b/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: