Replace remaining uses of NULL with nullptr
Follow-up to #38736 (these uses were likely added after this PR was merged).
This commit is contained in:
parent
c11502711e
commit
5b16020846
32 changed files with 98 additions and 98 deletions
|
|
@ -65,10 +65,10 @@ void JavaScriptToolsEditorPlugin::_download_zip(Variant p_v) {
|
|||
|
||||
FileAccess *src_f;
|
||||
zlib_filefunc_def io = zipio_create_io_from_file(&src_f);
|
||||
zipFile zip = zipOpen2("/tmp/project.zip", APPEND_STATUS_CREATE, NULL, &io);
|
||||
zipFile zip = zipOpen2("/tmp/project.zip", APPEND_STATUS_CREATE, nullptr, &io);
|
||||
String base_path = resource_path.substr(0, resource_path.rfind("/")) + "/";
|
||||
_zip_recursive(resource_path, base_path, zip);
|
||||
zipClose(zip, NULL);
|
||||
zipClose(zip, nullptr);
|
||||
godot_js_editor_download_file("/tmp/project.zip", "project.zip", "application/zip");
|
||||
}
|
||||
|
||||
|
|
@ -88,12 +88,12 @@ void JavaScriptToolsEditorPlugin::_zip_file(String p_path, String p_base_path, z
|
|||
String path = p_path.replace_first(p_base_path, "");
|
||||
zipOpenNewFileInZip(p_zip,
|
||||
path.utf8().get_data(),
|
||||
NULL,
|
||||
NULL,
|
||||
nullptr,
|
||||
nullptr,
|
||||
0,
|
||||
NULL,
|
||||
nullptr,
|
||||
0,
|
||||
NULL,
|
||||
nullptr,
|
||||
Z_DEFLATED,
|
||||
Z_DEFAULT_COMPRESSION);
|
||||
zipWriteInFileInZip(p_zip, data.ptr(), data.size());
|
||||
|
|
@ -116,12 +116,12 @@ void JavaScriptToolsEditorPlugin::_zip_recursive(String p_path, String p_base_pa
|
|||
String path = cs.replace_first(p_base_path, "") + "/";
|
||||
zipOpenNewFileInZip(p_zip,
|
||||
path.utf8().get_data(),
|
||||
NULL,
|
||||
NULL,
|
||||
nullptr,
|
||||
nullptr,
|
||||
0,
|
||||
NULL,
|
||||
nullptr,
|
||||
0,
|
||||
NULL,
|
||||
nullptr,
|
||||
Z_DEFLATED,
|
||||
Z_DEFAULT_COMPRESSION);
|
||||
zipCloseFileInZip(p_zip);
|
||||
|
|
|
|||
|
|
@ -399,7 +399,7 @@ void DisplayServerJavaScript::cursor_set_custom_image(const RES &p_cursor, Curso
|
|||
godot_js_display_cursor_set_custom_shape(godot2dom_cursor(p_shape), png.ptr(), len, p_hotspot.x, p_hotspot.y);
|
||||
|
||||
} else {
|
||||
godot_js_display_cursor_set_custom_shape(godot2dom_cursor(p_shape), NULL, 0, 0, 0);
|
||||
godot_js_display_cursor_set_custom_shape(godot2dom_cursor(p_shape), nullptr, 0, 0, 0);
|
||||
}
|
||||
|
||||
cursor_set_shape(cursor_shape);
|
||||
|
|
@ -771,8 +771,8 @@ DisplayServerJavaScript::DisplayServerJavaScript(const String &p_rendering_drive
|
|||
#define SET_EM_CALLBACK(target, ev, cb) \
|
||||
result = emscripten_set_##ev##_callback(target, nullptr, true, &cb); \
|
||||
EM_CHECK(ev)
|
||||
#define SET_EM_WINDOW_CALLBACK(ev, cb) \
|
||||
result = emscripten_set_##ev##_callback(EMSCRIPTEN_EVENT_TARGET_WINDOW, NULL, false, &cb); \
|
||||
#define SET_EM_WINDOW_CALLBACK(ev, cb) \
|
||||
result = emscripten_set_##ev##_callback(EMSCRIPTEN_EVENT_TARGET_WINDOW, nullptr, false, &cb); \
|
||||
EM_CHECK(ev)
|
||||
// These callbacks from Emscripten's html5.h suffice to access most
|
||||
// JavaScript APIs.
|
||||
|
|
|
|||
|
|
@ -353,7 +353,7 @@ public:
|
|||
};
|
||||
|
||||
Error EditorExportPlatformJavaScript::_extract_template(const String &p_template, const String &p_dir, const String &p_name, bool pwa) {
|
||||
FileAccess *src_f = NULL;
|
||||
FileAccess *src_f = nullptr;
|
||||
zlib_filefunc_def io = zipio_create_io_from_file(&src_f);
|
||||
unzFile pkg = unzOpen2(p_template.utf8().get_data(), &io);
|
||||
|
||||
|
|
@ -372,7 +372,7 @@ Error EditorExportPlatformJavaScript::_extract_template(const String &p_template
|
|||
//get filename
|
||||
unz_file_info info;
|
||||
char fname[16384];
|
||||
unzGetCurrentFileInfo(pkg, &info, fname, 16384, NULL, 0, NULL, 0);
|
||||
unzGetCurrentFileInfo(pkg, &info, fname, 16384, nullptr, 0, nullptr, 0);
|
||||
|
||||
String file = fname;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue