summaryrefslogtreecommitdiffstats
path: root/platform/web
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-02-15 15:44:43 +0100
committerRémi Verschelde <rverschelde@gmail.com>2024-02-15 15:44:43 +0100
commitef5d6ccfb7bf155a238ada79db12ea41ca993116 (patch)
treebc1acc6c5b0df70661293de0f8d0586ce0808982 /platform/web
parent4859f8090f1e21d42bc81313f15367dcb1c4220c (diff)
parenta8bc9f3e78788bdf0be7348fcbfac15c127f1f48 (diff)
downloadredot-engine-ef5d6ccfb7bf155a238ada79db12ea41ca993116.tar.gz
Merge pull request #86966 from Muller-Castro/value2ref-core
Add const lvalue ref to `core/*` container parameters
Diffstat (limited to 'platform/web')
-rw-r--r--platform/web/os_web.cpp4
-rw-r--r--platform/web/os_web.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/platform/web/os_web.cpp b/platform/web/os_web.cpp
index cbdcbf565d..45671ca491 100644
--- a/platform/web/os_web.cpp
+++ b/platform/web/os_web.cpp
@@ -150,7 +150,7 @@ String OS_Web::get_executable_path() const {
return OS::get_executable_path();
}
-Error OS_Web::shell_open(String p_uri) {
+Error OS_Web::shell_open(const String &p_uri) {
// Open URI in a new tab, browser will deal with it by protocol.
godot_js_os_shell_open(p_uri.utf8().get_data());
return OK;
@@ -239,7 +239,7 @@ bool OS_Web::is_userfs_persistent() const {
return idb_available;
}
-Error OS_Web::open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path, String *r_resolved_path) {
+Error OS_Web::open_dynamic_library(const String &p_path, void *&p_library_handle, bool p_also_set_library_path, String *r_resolved_path) {
String path = p_path.get_file();
p_library_handle = dlopen(path.utf8().get_data(), RTLD_NOW);
ERR_FAIL_NULL_V_MSG(p_library_handle, ERR_CANT_OPEN, vformat("Can't open dynamic library: %s. Error: %s.", p_path, dlerror()));
diff --git a/platform/web/os_web.h b/platform/web/os_web.h
index 5a48997c17..e578c93925 100644
--- a/platform/web/os_web.h
+++ b/platform/web/os_web.h
@@ -89,7 +89,7 @@ public:
int get_default_thread_pool_size() const override { return 1; }
String get_executable_path() const override;
- Error shell_open(String p_uri) override;
+ Error shell_open(const String &p_uri) override;
String get_name() const override;
// Override default OS implementation which would block the main thread with delay_usec.
@@ -107,7 +107,7 @@ public:
void alert(const String &p_alert, const String &p_title = "ALERT!") override;
- Error open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path = false, String *r_resolved_path = nullptr) override;
+ Error open_dynamic_library(const String &p_path, void *&p_library_handle, bool p_also_set_library_path = false, String *r_resolved_path = nullptr) override;
void resume_audio();