Merge pull request #89422 from Repiteo/clang-tidy-NULL
clang-tidy: Enforce `modernize-use-nullptr`
This commit is contained in:
commit
48b650c254
24 changed files with 98 additions and 100 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -6826,13 +6826,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);
|
||||
|
|
@ -6873,7 +6873,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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue