From 033dc4dbefed22aab7b58a60e27ce3c86943fe25 Mon Sep 17 00:00:00 2001 From: "M. Huri" Date: Tue, 12 Oct 2021 14:30:55 +0700 Subject: [PATCH] Replaced NULL with nullptr --- drivers/unix/ip_unix.cpp | 2 +- drivers/vulkan/vulkan_context.cpp | 2 +- modules/xatlas_unwrap/register_types.cpp | 2 +- platform/osx/display_server_osx.mm | 4 ++-- scene/resources/mesh.cpp | 2 +- servers/rendering/renderer_rd/renderer_storage_rd.cpp | 2 +- servers/rendering/renderer_rd/renderer_storage_rd.h | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/unix/ip_unix.cpp b/drivers/unix/ip_unix.cpp index d32592e81ab..42b5bbfaf24 100644 --- a/drivers/unix/ip_unix.cpp +++ b/drivers/unix/ip_unix.cpp @@ -110,7 +110,7 @@ void IPUnix::_resolve_hostname(List &r_addresses, const String &p_hos struct addrinfo *next = result; do { - if (next->ai_addr == NULL) { + if (next->ai_addr == nullptr) { next = next->ai_next; continue; } diff --git a/drivers/vulkan/vulkan_context.cpp b/drivers/vulkan/vulkan_context.cpp index 152efc7807a..44fed02f411 100644 --- a/drivers/vulkan/vulkan_context.cpp +++ b/drivers/vulkan/vulkan_context.cpp @@ -525,7 +525,7 @@ Error VulkanContext::_check_capabilities() { // check our extended features VkPhysicalDeviceMultiviewFeatures multiview_features; multiview_features.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES; - multiview_features.pNext = NULL; + multiview_features.pNext = nullptr; VkPhysicalDeviceFeatures2 device_features; device_features.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2; diff --git a/modules/xatlas_unwrap/register_types.cpp b/modules/xatlas_unwrap/register_types.cpp index 8913ef1b65c..58a6216b1ef 100644 --- a/modules/xatlas_unwrap/register_types.cpp +++ b/modules/xatlas_unwrap/register_types.cpp @@ -114,7 +114,7 @@ bool xatlas_mesh_lightmap_unwrap_callback(float p_texel_size, const float *p_ver input_mesh.vertexPositionStride = sizeof(float) * 3; input_mesh.vertexNormalData = p_normals; input_mesh.vertexNormalStride = sizeof(uint32_t) * 3; - input_mesh.vertexUvData = NULL; + input_mesh.vertexUvData = nullptr; input_mesh.vertexUvStride = 0; xatlas::ChartOptions chart_options; diff --git a/platform/osx/display_server_osx.mm b/platform/osx/display_server_osx.mm index da6c45793ab..3fe055a5118 100644 --- a/platform/osx/display_server_osx.mm +++ b/platform/osx/display_server_osx.mm @@ -3014,7 +3014,7 @@ void DisplayServerOSX::cursor_set_custom_image(const RES &p_cursor, CursorShape ERR_FAIL_COND(!image.is_valid()); NSBitmapImageRep *imgrep = [[NSBitmapImageRep alloc] - initWithBitmapDataPlanes:NULL + initWithBitmapDataPlanes:nullptr pixelsWide:int(texture_size.width) pixelsHigh:int(texture_size.height) bitsPerSample:8 @@ -3418,7 +3418,7 @@ void DisplayServerOSX::set_icon(const Ref &p_icon) { img = img->duplicate(); img->convert(Image::FORMAT_RGBA8); NSBitmapImageRep *imgrep = [[NSBitmapImageRep alloc] - initWithBitmapDataPlanes:NULL + initWithBitmapDataPlanes:nullptr pixelsWide:img->get_width() pixelsHigh:img->get_height() bitsPerSample:8 diff --git a/scene/resources/mesh.cpp b/scene/resources/mesh.cpp index 18e6a511187..7ffe0b03e1f 100644 --- a/scene/resources/mesh.cpp +++ b/scene/resources/mesh.cpp @@ -1577,7 +1577,7 @@ void ArrayMesh::regen_normal_maps() { } //dirty hack -bool (*array_mesh_lightmap_unwrap_callback)(float p_texel_size, const float *p_vertices, const float *p_normals, int p_vertex_count, const int *p_indices, int p_index_count, const uint8_t *p_cache_data, bool *r_use_cache, uint8_t **r_mesh_cache, int *r_mesh_cache_size, float **r_uv, int **r_vertex, int *r_vertex_count, int **r_index, int *r_index_count, int *r_size_hint_x, int *r_size_hint_y) = NULL; +bool (*array_mesh_lightmap_unwrap_callback)(float p_texel_size, const float *p_vertices, const float *p_normals, int p_vertex_count, const int *p_indices, int p_index_count, const uint8_t *p_cache_data, bool *r_use_cache, uint8_t **r_mesh_cache, int *r_mesh_cache_size, float **r_uv, int **r_vertex, int *r_vertex_count, int **r_index, int *r_index_count, int *r_size_hint_x, int *r_size_hint_y) = nullptr; struct ArrayMeshLightmapSurface { Ref material; diff --git a/servers/rendering/renderer_rd/renderer_storage_rd.cpp b/servers/rendering/renderer_rd/renderer_storage_rd.cpp index 45d3b3f09fa..1d46db5bbd3 100644 --- a/servers/rendering/renderer_rd/renderer_storage_rd.cpp +++ b/servers/rendering/renderer_rd/renderer_storage_rd.cpp @@ -9970,6 +9970,6 @@ RendererStorageRD::~RendererStorageRD() { if (effects) { memdelete(effects); - effects = NULL; + effects = nullptr; } } diff --git a/servers/rendering/renderer_rd/renderer_storage_rd.h b/servers/rendering/renderer_rd/renderer_storage_rd.h index d56afcc4484..d6129bb57bc 100644 --- a/servers/rendering/renderer_rd/renderer_storage_rd.h +++ b/servers/rendering/renderer_rd/renderer_storage_rd.h @@ -1284,7 +1284,7 @@ private: void _update_global_variables(); /* EFFECTS */ - EffectsRD *effects = NULL; + EffectsRD *effects = nullptr; public: virtual bool can_create_resources_async() const;