summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorThaddeus Crews <repiteo@outlook.com>2024-03-12 09:40:40 -0500
committerThaddeus Crews <repiteo@outlook.com>2024-03-12 10:59:53 -0500
commit3b3e2374c9e5f73de76b353f3607c52b864d1e69 (patch)
tree340733687864525f67dfa0ebd83d435e61891a29 /modules
parentb18942d429c23112c3e01aa1649c1704eaf86d0d (diff)
downloadredot-engine-3b3e2374c9e5f73de76b353f3607c52b864d1e69.tar.gz
clang-tidy: Enforce `modernize-use-nullptr`
Diffstat (limited to 'modules')
-rw-r--r--modules/ktx/texture_loader_ktx.cpp2
-rw-r--r--modules/mono/editor/hostfxr_resolver.cpp2
-rw-r--r--modules/openxr/openxr_api.h2
-rw-r--r--modules/text_server_adv/text_server_adv.cpp6
4 files changed, 6 insertions, 6 deletions
diff --git a/modules/ktx/texture_loader_ktx.cpp b/modules/ktx/texture_loader_ktx.cpp
index 026c0ce510..7c73f9cb8a 100644
--- a/modules/ktx/texture_loader_ktx.cpp
+++ b/modules/ktx/texture_loader_ktx.cpp
@@ -90,7 +90,7 @@ static Ref<Image> load_from_file_access(Ref<FileAccess> f, Error *r_error) {
ktx_stream.destruct = ktx_destruct;
ktx_stream.type = eStreamTypeCustom;
ktx_stream.data.custom_ptr.address = &f;
- ktx_stream.data.custom_ptr.allocatorAddress = NULL;
+ ktx_stream.data.custom_ptr.allocatorAddress = nullptr;
ktx_stream.data.custom_ptr.size = 0;
ktx_stream.readpos = 0;
ktx_stream.closeOnDestruct = false;
diff --git a/modules/mono/editor/hostfxr_resolver.cpp b/modules/mono/editor/hostfxr_resolver.cpp
index 4f15335c1e..7fa482969e 100644
--- a/modules/mono/editor/hostfxr_resolver.cpp
+++ b/modules/mono/editor/hostfxr_resolver.cpp
@@ -239,7 +239,7 @@ bool get_dotnet_self_registered_dir(String &r_dotnet_root) {
String sub_key = "SOFTWARE\\dotnet\\Setup\\InstalledVersions\\" + get_dotnet_arch();
Char16String value = String("InstallLocation").utf16();
- HKEY hkey = NULL;
+ HKEY hkey = nullptr;
LSTATUS result = RegOpenKeyExW(HKEY_LOCAL_MACHINE, (LPCWSTR)(sub_key.utf16().get_data()), 0, KEY_READ | KEY_WOW64_32KEY, &hkey);
if (result != ERROR_SUCCESS) {
return false;
diff --git a/modules/openxr/openxr_api.h b/modules/openxr/openxr_api.h
index d3e6eb01ce..e1a04a0796 100644
--- a/modules/openxr/openxr_api.h
+++ b/modules/openxr/openxr_api.h
@@ -118,7 +118,7 @@ private:
XrSession session = XR_NULL_HANDLE;
XrSessionState session_state = XR_SESSION_STATE_UNKNOWN;
bool running = false;
- XrFrameState frame_state = { XR_TYPE_FRAME_STATE, NULL, 0, 0, false };
+ XrFrameState frame_state = { XR_TYPE_FRAME_STATE, nullptr, 0, 0, false };
double render_target_size_multiplier = 1.0;
OpenXRGraphicsExtensionWrapper *graphics_extension = nullptr;
diff --git a/modules/text_server_adv/text_server_adv.cpp b/modules/text_server_adv/text_server_adv.cpp
index bb198c9c2b..36dfa55e57 100644
--- a/modules/text_server_adv/text_server_adv.cpp
+++ b/modules/text_server_adv/text_server_adv.cpp
@@ -6820,13 +6820,13 @@ int64_t TextServerAdvanced::_is_confusable(const String &p_string, const PackedS
}
for (int i = 0; i < p_dict.size(); i++) {
Char16String word = p_dict[i].utf16();
- int32_t len = uspoof_getSkeleton(sc_conf, 0, word.get_data(), -1, NULL, 0, &status);
+ int32_t len = uspoof_getSkeleton(sc_conf, 0, word.get_data(), -1, nullptr, 0, &status);
skeletons.write[i] = (UChar *)memalloc(++len * sizeof(UChar));
status = U_ZERO_ERROR;
uspoof_getSkeleton(sc_conf, 0, word.get_data(), -1, skeletons.write[i], len, &status);
}
- int32_t len = uspoof_getSkeleton(sc_conf, 0, utf16.get_data(), -1, NULL, 0, &status);
+ int32_t len = uspoof_getSkeleton(sc_conf, 0, utf16.get_data(), -1, nullptr, 0, &status);
UChar *skel = (UChar *)memalloc(++len * sizeof(UChar));
status = U_ZERO_ERROR;
uspoof_getSkeleton(sc_conf, 0, utf16.get_data(), -1, skel, len, &status);
@@ -6867,7 +6867,7 @@ bool TextServerAdvanced::_spoof_check(const String &p_string) const {
uspoof_setRestrictionLevel(sc_spoof, USPOOF_MODERATELY_RESTRICTIVE);
}
- int32_t bitmask = uspoof_check(sc_spoof, utf16.get_data(), -1, NULL, &status);
+ int32_t bitmask = uspoof_check(sc_spoof, utf16.get_data(), -1, nullptr, &status);
ERR_FAIL_COND_V_MSG(U_FAILURE(status), false, u_errorName(status));
return (bitmask != 0);