You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-12 13:20:55 +00:00
Replace NULL with nullptr
This commit is contained in:
@@ -60,7 +60,7 @@
|
||||
#include "modules/gridmap/grid_map.h"
|
||||
#endif
|
||||
|
||||
NavigationMeshGenerator *NavigationMeshGenerator::singleton = NULL;
|
||||
NavigationMeshGenerator *NavigationMeshGenerator::singleton = nullptr;
|
||||
|
||||
void NavigationMeshGenerator::_add_vertex(const Vector3 &p_vec3, Vector<float> &p_verticies) {
|
||||
p_verticies.push_back(p_vec3.x);
|
||||
@@ -405,7 +405,7 @@ void NavigationMeshGenerator::_build_recast_navigation_mesh(
|
||||
ERR_FAIL_COND(!rcBuildCompactHeightfield(&ctx, cfg.walkableHeight, cfg.walkableClimb, *hf, *chf));
|
||||
|
||||
rcFreeHeightField(hf);
|
||||
hf = 0;
|
||||
hf = nullptr;
|
||||
|
||||
#ifdef TOOLS_ENABLED
|
||||
if (ep)
|
||||
@@ -452,9 +452,9 @@ void NavigationMeshGenerator::_build_recast_navigation_mesh(
|
||||
ERR_FAIL_COND(!rcBuildPolyMeshDetail(&ctx, *poly_mesh, *chf, cfg.detailSampleDist, cfg.detailSampleMaxError, *detail_mesh));
|
||||
|
||||
rcFreeCompactHeightfield(chf);
|
||||
chf = 0;
|
||||
chf = nullptr;
|
||||
rcFreeContourSet(cset);
|
||||
cset = 0;
|
||||
cset = nullptr;
|
||||
|
||||
#ifdef TOOLS_ENABLED
|
||||
if (ep)
|
||||
@@ -464,9 +464,9 @@ void NavigationMeshGenerator::_build_recast_navigation_mesh(
|
||||
_convert_detail_mesh_to_native_navigation_mesh(detail_mesh, p_nav_mesh);
|
||||
|
||||
rcFreePolyMesh(poly_mesh);
|
||||
poly_mesh = 0;
|
||||
poly_mesh = nullptr;
|
||||
rcFreePolyMeshDetail(detail_mesh);
|
||||
detail_mesh = 0;
|
||||
detail_mesh = nullptr;
|
||||
}
|
||||
|
||||
NavigationMeshGenerator *NavigationMeshGenerator::get_singleton() {
|
||||
@@ -485,7 +485,7 @@ void NavigationMeshGenerator::bake(Ref<NavigationMesh> p_nav_mesh, Node *p_node)
|
||||
ERR_FAIL_COND(!p_nav_mesh.is_valid());
|
||||
|
||||
#ifdef TOOLS_ENABLED
|
||||
EditorProgress *ep(NULL);
|
||||
EditorProgress *ep(nullptr);
|
||||
if (Engine::get_singleton()->is_editor_hint()) {
|
||||
ep = memnew(EditorProgress("bake", TTR("Navigation Mesh Generator Setup:"), 11));
|
||||
}
|
||||
@@ -515,11 +515,11 @@ void NavigationMeshGenerator::bake(Ref<NavigationMesh> p_nav_mesh, Node *p_node)
|
||||
|
||||
if (vertices.size() > 0 && indices.size() > 0) {
|
||||
|
||||
rcHeightfield *hf = NULL;
|
||||
rcCompactHeightfield *chf = NULL;
|
||||
rcContourSet *cset = NULL;
|
||||
rcPolyMesh *poly_mesh = NULL;
|
||||
rcPolyMeshDetail *detail_mesh = NULL;
|
||||
rcHeightfield *hf = nullptr;
|
||||
rcCompactHeightfield *chf = nullptr;
|
||||
rcContourSet *cset = nullptr;
|
||||
rcPolyMesh *poly_mesh = nullptr;
|
||||
rcPolyMeshDetail *detail_mesh = nullptr;
|
||||
|
||||
_build_recast_navigation_mesh(
|
||||
p_nav_mesh,
|
||||
@@ -535,19 +535,19 @@ void NavigationMeshGenerator::bake(Ref<NavigationMesh> p_nav_mesh, Node *p_node)
|
||||
indices);
|
||||
|
||||
rcFreeHeightField(hf);
|
||||
hf = 0;
|
||||
hf = nullptr;
|
||||
|
||||
rcFreeCompactHeightfield(chf);
|
||||
chf = 0;
|
||||
chf = nullptr;
|
||||
|
||||
rcFreeContourSet(cset);
|
||||
cset = 0;
|
||||
cset = nullptr;
|
||||
|
||||
rcFreePolyMesh(poly_mesh);
|
||||
poly_mesh = 0;
|
||||
poly_mesh = nullptr;
|
||||
|
||||
rcFreePolyMeshDetail(detail_mesh);
|
||||
detail_mesh = 0;
|
||||
detail_mesh = nullptr;
|
||||
}
|
||||
|
||||
#ifdef TOOLS_ENABLED
|
||||
|
||||
Reference in New Issue
Block a user