1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-11 13:10:58 +00:00

Use const ref parameters in the OpenXR module

This commit is contained in:
Aaron Franke
2025-09-26 17:02:33 -07:00
parent b4472f4670
commit c3e6002c6e
36 changed files with 183 additions and 185 deletions

View File

@@ -74,7 +74,7 @@ String OpenXRAction::get_name_with_set() const {
return action_name;
}
void OpenXRAction::set_localized_name(const String p_localized_name) {
void OpenXRAction::set_localized_name(const String &p_localized_name) {
localized_name = p_localized_name;
emit_changed();
}
@@ -101,21 +101,21 @@ PackedStringArray OpenXRAction::get_toplevel_paths() const {
return toplevel_paths;
}
void OpenXRAction::add_toplevel_path(const String p_toplevel_path) {
void OpenXRAction::add_toplevel_path(const String &p_toplevel_path) {
if (!toplevel_paths.has(p_toplevel_path)) {
toplevel_paths.push_back(p_toplevel_path);
emit_changed();
}
}
void OpenXRAction::rem_toplevel_path(const String p_toplevel_path) {
void OpenXRAction::rem_toplevel_path(const String &p_toplevel_path) {
if (toplevel_paths.has(p_toplevel_path)) {
toplevel_paths.erase(p_toplevel_path);
emit_changed();
}
}
void OpenXRAction::parse_toplevel_paths(const String p_toplevel_paths) {
void OpenXRAction::parse_toplevel_paths(const String &p_toplevel_paths) {
toplevel_paths = p_toplevel_paths.split(",", false);
emit_changed();
}