1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-05 17:15:09 +00:00

clang-tidy: Enforce modernize-use-nullptr

This commit is contained in:
Thaddeus Crews
2024-03-12 09:40:40 -05:00
parent b18942d429
commit 3b3e2374c9
24 changed files with 98 additions and 100 deletions

View File

@@ -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);