summaryrefslogtreecommitdiffstats
path: root/scene/resources/surface_tool.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-09-12 17:47:43 +0200
committerRémi Verschelde <rverschelde@gmail.com>2023-09-12 17:47:43 +0200
commitff7428f4cda091044de28224d40da57ef1c75126 (patch)
tree0a1746dc643ddea8ae9b79532f81823b5e2c7126 /scene/resources/surface_tool.cpp
parent98b50eb3083094a352b36b184d7b60b77ad982fe (diff)
parenta29416e3321b678c751f5bd6ebbebed544af09aa (diff)
downloadredot-engine-ff7428f4cda091044de28224d40da57ef1c75126.tar.gz
Merge pull request #81568 from AThousandShips/null_check_scene_main
[Scene,Main] Replace `ERR_FAIL_COND` with `ERR_FAIL_NULL` where applicable
Diffstat (limited to 'scene/resources/surface_tool.cpp')
-rw-r--r--scene/resources/surface_tool.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/resources/surface_tool.cpp b/scene/resources/surface_tool.cpp
index af8beb1d25..2523215d4d 100644
--- a/scene/resources/surface_tool.cpp
+++ b/scene/resources/surface_tool.cpp
@@ -1279,7 +1279,7 @@ SurfaceTool::CustomFormat SurfaceTool::get_custom_format(int p_channel_index) co
return last_custom_format[p_channel_index];
}
void SurfaceTool::optimize_indices_for_cache() {
- ERR_FAIL_COND(optimize_vertex_cache_func == nullptr);
+ ERR_FAIL_NULL(optimize_vertex_cache_func);
ERR_FAIL_COND(index_array.size() == 0);
ERR_FAIL_COND(primitive != Mesh::PRIMITIVE_TRIANGLES);
ERR_FAIL_COND(index_array.size() % 3 != 0);
@@ -1308,7 +1308,7 @@ Vector<int> SurfaceTool::generate_lod(float p_threshold, int p_target_index_coun
Vector<int> lod;
- ERR_FAIL_COND_V(simplify_func == nullptr, lod);
+ ERR_FAIL_NULL_V(simplify_func, lod);
ERR_FAIL_COND_V(p_target_index_count < 0, lod);
ERR_FAIL_COND_V(vertex_array.size() == 0, lod);
ERR_FAIL_COND_V(index_array.size() == 0, lod);