mirror of
https://github.com/godotengine/godot.git
synced 2025-11-02 06:31:13 +00:00
Replace NULL with nullptr
This commit is contained in:
parent
5f11e15571
commit
95a1400a2a
755 changed files with 5742 additions and 5742 deletions
|
|
@ -67,7 +67,7 @@ Error DirAccessWindows::list_dir_begin() {
|
|||
_cishidden = false;
|
||||
|
||||
list_dir_end();
|
||||
p->h = FindFirstFileExW((current_dir + "\\*").c_str(), FindExInfoStandard, &p->fu, FindExSearchNameMatch, NULL, 0);
|
||||
p->h = FindFirstFileExW((current_dir + "\\*").c_str(), FindExInfoStandard, &p->fu, FindExSearchNameMatch, nullptr, 0);
|
||||
|
||||
return (p->h == INVALID_HANDLE_VALUE) ? ERR_CANT_OPEN : OK;
|
||||
}
|
||||
|
|
@ -175,7 +175,7 @@ Error DirAccessWindows::make_dir(String p_dir) {
|
|||
p_dir = "\\\\?\\" + p_dir; //done according to
|
||||
// https://msdn.microsoft.com/en-us/library/windows/desktop/aa363855(v=vs.85).aspx
|
||||
|
||||
success = CreateDirectoryW(p_dir.c_str(), NULL);
|
||||
success = CreateDirectoryW(p_dir.c_str(), nullptr);
|
||||
err = GetLastError();
|
||||
|
||||
if (success) {
|
||||
|
|
@ -275,11 +275,11 @@ Error DirAccessWindows::rename(String p_path, String p_new_path) {
|
|||
if (p_path.to_lower() == p_new_path.to_lower()) {
|
||||
WCHAR tmpfile[MAX_PATH];
|
||||
|
||||
if (!GetTempFileNameW(fix_path(get_current_dir()).c_str(), NULL, 0, tmpfile)) {
|
||||
if (!GetTempFileNameW(fix_path(get_current_dir()).c_str(), nullptr, 0, tmpfile)) {
|
||||
return FAILED;
|
||||
}
|
||||
|
||||
if (!::ReplaceFileW(tmpfile, p_path.c_str(), NULL, 0, NULL, NULL)) {
|
||||
if (!::ReplaceFileW(tmpfile, p_path.c_str(), nullptr, 0, nullptr, nullptr)) {
|
||||
DeleteFileW(tmpfile);
|
||||
return FAILED;
|
||||
}
|
||||
|
|
@ -349,7 +349,7 @@ FileType DirAccessWindows::get_file_type(const String& p_file) const {
|
|||
size_t DirAccessWindows::get_space_left() {
|
||||
|
||||
uint64_t bytes = 0;
|
||||
if (!GetDiskFreeSpaceEx(NULL, (PULARGE_INTEGER)&bytes, NULL, NULL))
|
||||
if (!GetDiskFreeSpaceEx(nullptr, (PULARGE_INTEGER)&bytes, nullptr, nullptr))
|
||||
return 0;
|
||||
|
||||
//this is either 0 or a value in bytes.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue