Explicitly use nullptr

This commit is contained in:
RevoluPowered
2019-10-27 14:16:39 +00:00
parent 5d0c63391b
commit 9c8d835704
5 changed files with 44 additions and 44 deletions
+9 -9
View File
@@ -435,11 +435,11 @@ struct aiAnimMesh
/**Anim Mesh name */
C_STRUCT aiString mName;
/** Replacement for aiMesh::mVertices. If this array is non-NULL,
/** Replacement for aiMesh::mVertices. If this array is non-nullptr,
* it *must* contain mNumVertices entries. The corresponding
* array in the host mesh must be non-NULL as well - animation
* array in the host mesh must be non-nullptr as well - animation
* meshes may neither add or nor remove vertex components (if
* a replacement array is NULL and the corresponding source
* a replacement array is nullptr and the corresponding source
* array is not, the source data is taken instead)*/
C_STRUCT aiVector3D* mVertices;
@@ -613,7 +613,7 @@ struct aiMesh
C_STRUCT aiVector3D* mVertices;
/** Vertex normals.
* The array contains normalized vectors, NULL if not present.
* The array contains normalized vectors, nullptr if not present.
* The array is mNumVertices in size. Normals are undefined for
* point and line primitives. A mesh consisting of points and
* lines only may not have normal vectors. Meshes with mixed
@@ -636,7 +636,7 @@ struct aiMesh
/** Vertex tangents.
* The tangent of a vertex points in the direction of the positive
* X texture axis. The array contains normalized vectors, NULL if
* X texture axis. The array contains normalized vectors, nullptr if
* not present. The array is mNumVertices in size. A mesh consisting
* of points and lines only may not have normal vectors. Meshes with
* mixed primitive types (i.e. lines and triangles) may have
@@ -650,7 +650,7 @@ struct aiMesh
/** Vertex bitangents.
* The bitangent of a vertex points in the direction of the positive
* Y texture axis. The array contains normalized vectors, NULL if not
* Y texture axis. The array contains normalized vectors, nullptr if not
* present. The array is mNumVertices in size.
* @note If the mesh contains tangents, it automatically also contains
* bitangents.
@@ -659,14 +659,14 @@ struct aiMesh
/** Vertex color sets.
* A mesh may contain 0 to #AI_MAX_NUMBER_OF_COLOR_SETS vertex
* colors per vertex. NULL if not present. Each array is
* colors per vertex. nullptr if not present. Each array is
* mNumVertices in size if present.
*/
C_STRUCT aiColor4D* mColors[AI_MAX_NUMBER_OF_COLOR_SETS];
/** Vertex texture coords, also known as UV channels.
* A mesh may contain 0 to AI_MAX_NUMBER_OF_TEXTURECOORDS per
* vertex. NULL if not present. The array is mNumVertices in size.
* vertex. nullptr if not present. The array is mNumVertices in size.
*/
C_STRUCT aiVector3D* mTextureCoords[AI_MAX_NUMBER_OF_TEXTURECOORDS];
@@ -688,7 +688,7 @@ struct aiMesh
C_STRUCT aiFace* mFaces;
/** The number of bones this mesh contains.
* Can be 0, in which case the mBones array is NULL.
* Can be 0, in which case the mBones array is nullptr.
*/
unsigned int mNumBones;
+11 -11
View File
@@ -110,13 +110,13 @@ struct ASSIMP_API aiNode
/** The transformation relative to the node's parent. */
C_STRUCT aiMatrix4x4 mTransformation;
/** Parent node. NULL if this node is the root node. */
/** Parent node. nullptr if this node is the root node. */
C_STRUCT aiNode* mParent;
/** The number of child nodes of this node. */
unsigned int mNumChildren;
/** The child nodes of this node. NULL if mNumChildren is 0. */
/** The child nodes of this node. nullptr if mNumChildren is 0. */
C_STRUCT aiNode** mChildren;
/** The number of meshes of this node. */
@@ -127,7 +127,7 @@ struct ASSIMP_API aiNode
*/
unsigned int* mMeshes;
/** Metadata associated with this node or NULL if there is no metadata.
/** Metadata associated with this node or nullptr if there is no metadata.
* Whether any metadata is generated depends on the source file format. See the
* @link importer_notes @endlink page for more information on every source file
* format. Importers that don't document any metadata don't write any.
@@ -149,7 +149,7 @@ struct ASSIMP_API aiNode
* of the scene.
*
* @param name Name to search for
* @return NULL or a valid Node if the search was successful.
* @return nullptr or a valid Node if the search was successful.
*/
inline
const aiNode* FindNode(const aiString& name) const {
@@ -344,7 +344,7 @@ struct aiScene
#ifdef __cplusplus
//! Default constructor - set everything to 0/NULL
//! Default constructor - set everything to 0/nullptr
ASSIMP_API aiScene();
//! Destructor
@@ -353,33 +353,33 @@ struct aiScene
//! Check whether the scene contains meshes
//! Unless no special scene flags are set this will always be true.
inline bool HasMeshes() const {
return mMeshes != NULL && mNumMeshes > 0;
return mMeshes != nullptr && mNumMeshes > 0;
}
//! Check whether the scene contains materials
//! Unless no special scene flags are set this will always be true.
inline bool HasMaterials() const {
return mMaterials != NULL && mNumMaterials > 0;
return mMaterials != nullptr && mNumMaterials > 0;
}
//! Check whether the scene contains lights
inline bool HasLights() const {
return mLights != NULL && mNumLights > 0;
return mLights != nullptr && mNumLights > 0;
}
//! Check whether the scene contains textures
inline bool HasTextures() const {
return mTextures != NULL && mNumTextures > 0;
return mTextures != nullptr && mNumTextures > 0;
}
//! Check whether the scene contains cameras
inline bool HasCameras() const {
return mCameras != NULL && mNumCameras > 0;
return mCameras != nullptr && mNumCameras > 0;
}
//! Check whether the scene contains animations
inline bool HasAnimations() const {
return mAnimations != NULL && mNumAnimations > 0;
return mAnimations != nullptr && mNumAnimations > 0;
}
//! Returns a short filename from a full path