Apply suggestions from code review

* make the copy constructors explicitly defaulted
* split compound assert
pull/2242/head
Martin Jeřábek 2018-11-28 14:19:46 +01:00 committed by GitHub
parent 0a57ab22fb
commit 4f767ecd13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 4 deletions

View File

@ -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);

View File

@ -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

View File

@ -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:

View File

@ -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: