فهرست منبع

Use reference to constant in functions

qarmin 6 سال پیش
والد
کامیت
01cc7a996b
42فایلهای تغییر یافته به همراه82 افزوده شده و 82 حذف شده
  1. 2 2
      core/class_db.cpp
  2. 2 2
      core/class_db.h
  3. 1 1
      core/math/basis.cpp
  4. 1 1
      core/math/basis.h
  5. 3 3
      core/project_settings.cpp
  6. 3 3
      core/project_settings.h
  7. 1 1
      drivers/unix/net_socket_posix.cpp
  8. 1 1
      drivers/unix/net_socket_posix.h
  9. 2 2
      editor/editor_resource_preview.cpp
  10. 2 2
      editor/editor_resource_preview.h
  11. 1 1
      editor/editor_run.cpp
  12. 1 1
      editor/editor_run.h
  13. 3 3
      editor/filesystem_dock.cpp
  14. 3 3
      editor/filesystem_dock.h
  15. 1 1
      editor/plugins/curve_editor_plugin.cpp
  16. 1 1
      editor/plugins/curve_editor_plugin.h
  17. 11 11
      editor/plugins/editor_preview_plugins.cpp
  18. 11 11
      editor/plugins/editor_preview_plugins.h
  19. 1 1
      editor/plugins/spatial_editor_plugin.cpp
  20. 1 1
      editor/plugins/spatial_editor_plugin.h
  21. 5 5
      editor/plugins/tile_map_editor_plugin.cpp
  22. 5 5
      editor/plugins/tile_map_editor_plugin.h
  23. 1 1
      editor/plugins/tile_set_editor_plugin.cpp
  24. 1 1
      editor/plugins/tile_set_editor_plugin.h
  25. 1 1
      editor/plugins/visual_shader_editor_plugin.cpp
  26. 1 1
      editor/plugins/visual_shader_editor_plugin.h
  27. 1 1
      modules/gridmap/grid_map_editor_plugin.cpp
  28. 1 1
      modules/gridmap/grid_map_editor_plugin.h
  29. 1 1
      scene/gui/spin_box.cpp
  30. 1 1
      scene/gui/spin_box.h
  31. 1 1
      scene/main/node.cpp
  32. 1 1
      scene/main/node.h
  33. 1 1
      scene/main/scene_tree.cpp
  34. 1 1
      scene/main/scene_tree.h
  35. 1 1
      scene/resources/animation.cpp
  36. 1 1
      scene/resources/animation.h
  37. 1 1
      scene/resources/surface_tool.cpp
  38. 1 1
      scene/resources/surface_tool.h
  39. 1 1
      servers/arvr/arvr_positional_tracker.cpp
  40. 1 1
      servers/arvr/arvr_positional_tracker.h
  41. 1 1
      servers/arvr_server.cpp
  42. 1 1
      servers/arvr_server.h

+ 2 - 2
core/class_db.cpp

@@ -1148,7 +1148,7 @@ Variant::Type ClassDB::get_property_type(const StringName &p_class, const String
 	return Variant::NIL;
 	return Variant::NIL;
 }
 }
 
 
-StringName ClassDB::get_property_setter(StringName p_class, const StringName p_property) {
+StringName ClassDB::get_property_setter(StringName p_class, const StringName &p_property) {
 
 
 	ClassInfo *type = classes.getptr(p_class);
 	ClassInfo *type = classes.getptr(p_class);
 	ClassInfo *check = type;
 	ClassInfo *check = type;
@@ -1165,7 +1165,7 @@ StringName ClassDB::get_property_setter(StringName p_class, const StringName p_p
 	return StringName();
 	return StringName();
 }
 }
 
 
-StringName ClassDB::get_property_getter(StringName p_class, const StringName p_property) {
+StringName ClassDB::get_property_getter(StringName p_class, const StringName &p_property) {
 
 
 	ClassInfo *type = classes.getptr(p_class);
 	ClassInfo *type = classes.getptr(p_class);
 	ClassInfo *check = type;
 	ClassInfo *check = type;

+ 2 - 2
core/class_db.h

@@ -337,8 +337,8 @@ public:
 	static bool has_property(const StringName &p_class, const StringName &p_property, bool p_no_inheritance = false);
 	static bool has_property(const StringName &p_class, const StringName &p_property, bool p_no_inheritance = false);
 	static int get_property_index(const StringName &p_class, const StringName &p_property, bool *r_is_valid = NULL);
 	static int get_property_index(const StringName &p_class, const StringName &p_property, bool *r_is_valid = NULL);
 	static Variant::Type get_property_type(const StringName &p_class, const StringName &p_property, bool *r_is_valid = NULL);
 	static Variant::Type get_property_type(const StringName &p_class, const StringName &p_property, bool *r_is_valid = NULL);
-	static StringName get_property_setter(StringName p_class, const StringName p_property);
-	static StringName get_property_getter(StringName p_class, const StringName p_property);
+	static StringName get_property_setter(StringName p_class, const StringName &p_property);
+	static StringName get_property_getter(StringName p_class, const StringName &p_property);
 
 
 	static bool has_method(StringName p_class, StringName p_method, bool p_no_inheritance = false);
 	static bool has_method(StringName p_class, StringName p_method, bool p_no_inheritance = false);
 	static void set_method_flags(StringName p_class, StringName p_method, int p_flags);
 	static void set_method_flags(StringName p_class, StringName p_method, int p_flags);

+ 1 - 1
core/math/basis.cpp

@@ -852,7 +852,7 @@ void Basis::set_quat_scale(const Quat &p_quat, const Vector3 &p_scale) {
 	rotate(p_quat);
 	rotate(p_quat);
 }
 }
 
 
-void Basis::set_diagonal(const Vector3 p_diag) {
+void Basis::set_diagonal(const Vector3 &p_diag) {
 	elements[0][0] = p_diag.x;
 	elements[0][0] = p_diag.x;
 	elements[0][1] = 0;
 	elements[0][1] = 0;
 	elements[0][2] = 0;
 	elements[0][2] = 0;

+ 1 - 1
core/math/basis.h

@@ -153,7 +153,7 @@ public:
 	int get_orthogonal_index() const;
 	int get_orthogonal_index() const;
 	void set_orthogonal_index(int p_index);
 	void set_orthogonal_index(int p_index);
 
 
-	void set_diagonal(const Vector3 p_diag);
+	void set_diagonal(const Vector3 &p_diag);
 
 
 	bool is_orthogonal() const;
 	bool is_orthogonal() const;
 	bool is_diagonal() const;
 	bool is_diagonal() const;

+ 3 - 3
core/project_settings.cpp

@@ -487,7 +487,7 @@ void ProjectSettings::set_registering_order(bool p_enable) {
 	registering_order = p_enable;
 	registering_order = p_enable;
 }
 }
 
 
-Error ProjectSettings::_load_settings_binary(const String p_path) {
+Error ProjectSettings::_load_settings_binary(const String &p_path) {
 
 
 	Error err;
 	Error err;
 	FileAccess *f = FileAccess::open(p_path, FileAccess::READ, &err);
 	FileAccess *f = FileAccess::open(p_path, FileAccess::READ, &err);
@@ -530,7 +530,7 @@ Error ProjectSettings::_load_settings_binary(const String p_path) {
 	return OK;
 	return OK;
 }
 }
 
 
-Error ProjectSettings::_load_settings_text(const String p_path) {
+Error ProjectSettings::_load_settings_text(const String &p_path) {
 
 
 	Error err;
 	Error err;
 	FileAccess *f = FileAccess::open(p_path, FileAccess::READ, &err);
 	FileAccess *f = FileAccess::open(p_path, FileAccess::READ, &err);
@@ -593,7 +593,7 @@ Error ProjectSettings::_load_settings_text(const String p_path) {
 	}
 	}
 }
 }
 
 
-Error ProjectSettings::_load_settings_text_or_binary(const String p_text_path, const String p_bin_path) {
+Error ProjectSettings::_load_settings_text_or_binary(const String &p_text_path, const String &p_bin_path) {
 
 
 	// Attempt first to load the text-based project.godot file
 	// Attempt first to load the text-based project.godot file
 	Error err_text = _load_settings_text(p_text_path);
 	Error err_text = _load_settings_text(p_text_path);

+ 3 - 3
core/project_settings.h

@@ -97,9 +97,9 @@ protected:
 
 
 	static ProjectSettings *singleton;
 	static ProjectSettings *singleton;
 
 
-	Error _load_settings_text(const String p_path);
-	Error _load_settings_binary(const String p_path);
-	Error _load_settings_text_or_binary(const String p_text_path, const String p_bin_path);
+	Error _load_settings_text(const String &p_path);
+	Error _load_settings_binary(const String &p_path);
+	Error _load_settings_text_or_binary(const String &p_text_path, const String &p_bin_path);
 
 
 	Error _save_settings_text(const String &p_file, const Map<String, List<String> > &props, const CustomMap &p_custom = CustomMap(), const String &p_custom_features = String());
 	Error _save_settings_text(const String &p_file, const Map<String, List<String> > &props, const CustomMap &p_custom = CustomMap(), const String &p_custom_features = String());
 	Error _save_settings_binary(const String &p_file, const Map<String, List<String> > &props, const CustomMap &p_custom = CustomMap(), const String &p_custom_features = String());
 	Error _save_settings_binary(const String &p_file, const Map<String, List<String> > &props, const CustomMap &p_custom = CustomMap(), const String &p_custom_features = String());

+ 1 - 1
drivers/unix/net_socket_posix.cpp

@@ -212,7 +212,7 @@ NetSocketPosix::NetError NetSocketPosix::_get_socket_error() {
 #pragma GCC diagnostic pop
 #pragma GCC diagnostic pop
 #endif
 #endif
 
 
-bool NetSocketPosix::_can_use_ip(const IP_Address p_ip, const bool p_for_bind) const {
+bool NetSocketPosix::_can_use_ip(const IP_Address &p_ip, const bool p_for_bind) const {
 
 
 	if (p_for_bind && !(p_ip.is_valid() || p_ip.is_wildcard())) {
 	if (p_for_bind && !(p_ip.is_valid() || p_ip.is_wildcard())) {
 		return false;
 		return false;

+ 1 - 1
drivers/unix/net_socket_posix.h

@@ -65,7 +65,7 @@ private:
 protected:
 protected:
 	static NetSocket *_create_func();
 	static NetSocket *_create_func();
 
 
-	bool _can_use_ip(const IP_Address p_ip, const bool p_for_bind) const;
+	bool _can_use_ip(const IP_Address &p_ip, const bool p_for_bind) const;
 
 
 public:
 public:
 	static void make_default();
 	static void make_default();

+ 2 - 2
editor/editor_resource_preview.cpp

@@ -50,7 +50,7 @@ bool EditorResourcePreviewGenerator::handles(const String &p_type) const {
 	ERR_FAIL_V(false);
 	ERR_FAIL_V(false);
 }
 }
 
 
-Ref<Texture> EditorResourcePreviewGenerator::generate(const RES &p_from, const Size2 p_size) const {
+Ref<Texture> EditorResourcePreviewGenerator::generate(const RES &p_from, const Size2 &p_size) const {
 
 
 	if (get_script_instance() && get_script_instance()->has_method("generate")) {
 	if (get_script_instance() && get_script_instance()->has_method("generate")) {
 		return get_script_instance()->call("generate", p_from, p_size);
 		return get_script_instance()->call("generate", p_from, p_size);
@@ -59,7 +59,7 @@ Ref<Texture> EditorResourcePreviewGenerator::generate(const RES &p_from, const S
 	ERR_FAIL_V(Ref<Texture>());
 	ERR_FAIL_V(Ref<Texture>());
 }
 }
 
 
-Ref<Texture> EditorResourcePreviewGenerator::generate_from_path(const String &p_path, const Size2 p_size) const {
+Ref<Texture> EditorResourcePreviewGenerator::generate_from_path(const String &p_path, const Size2 &p_size) const {
 
 
 	if (get_script_instance() && get_script_instance()->has_method("generate_from_path")) {
 	if (get_script_instance() && get_script_instance()->has_method("generate_from_path")) {
 		return get_script_instance()->call("generate_from_path", p_path, p_size);
 		return get_script_instance()->call("generate_from_path", p_path, p_size);

+ 2 - 2
editor/editor_resource_preview.h

@@ -45,8 +45,8 @@ protected:
 
 
 public:
 public:
 	virtual bool handles(const String &p_type) const;
 	virtual bool handles(const String &p_type) const;
-	virtual Ref<Texture> generate(const RES &p_from, const Size2 p_size) const;
-	virtual Ref<Texture> generate_from_path(const String &p_path, const Size2 p_size) const;
+	virtual Ref<Texture> generate(const RES &p_from, const Size2 &p_size) const;
+	virtual Ref<Texture> generate_from_path(const String &p_path, const Size2 &p_size) const;
 
 
 	virtual bool generate_small_preview_automatically() const;
 	virtual bool generate_small_preview_automatically() const;
 	virtual bool can_generate_small_preview() const;
 	virtual bool can_generate_small_preview() const;

+ 1 - 1
editor/editor_run.cpp

@@ -37,7 +37,7 @@ EditorRun::Status EditorRun::get_status() const {
 
 
 	return status;
 	return status;
 }
 }
-Error EditorRun::run(const String &p_scene, const String p_custom_args, const List<String> &p_breakpoints) {
+Error EditorRun::run(const String &p_scene, const String &p_custom_args, const List<String> &p_breakpoints) {
 
 
 	List<String> args;
 	List<String> args;
 
 

+ 1 - 1
editor/editor_run.h

@@ -51,7 +51,7 @@ private:
 
 
 public:
 public:
 	Status get_status() const;
 	Status get_status() const;
-	Error run(const String &p_scene, const String p_custom_args, const List<String> &p_breakpoints);
+	Error run(const String &p_scene, const String &p_custom_args, const List<String> &p_breakpoints);
 	void run_native_notify() { status = STATUS_PLAY; }
 	void run_native_notify() { status = STATUS_PLAY; }
 	void stop();
 	void stop();
 
 

+ 3 - 3
editor/filesystem_dock.cpp

@@ -163,7 +163,7 @@ Vector<String> FileSystemDock::_compute_uncollapsed_paths() {
 	return uncollapsed_paths;
 	return uncollapsed_paths;
 }
 }
 
 
-void FileSystemDock::_update_tree(const Vector<String> p_uncollapsed_paths, bool p_uncollapse_root, bool p_select_in_favorites) {
+void FileSystemDock::_update_tree(const Vector<String> &p_uncollapsed_paths, bool p_uncollapse_root, bool p_select_in_favorites) {
 
 
 	// Recreate the tree
 	// Recreate the tree
 	tree->clear();
 	tree->clear();
@@ -812,7 +812,7 @@ void FileSystemDock::_update_file_list(bool p_keep_selection) {
 	}
 	}
 }
 }
 
 
-void FileSystemDock::_select_file(const String p_path, bool p_select_in_favorites) {
+void FileSystemDock::_select_file(const String &p_path, bool p_select_in_favorites) {
 	String fpath = p_path;
 	String fpath = p_path;
 	if (fpath.ends_with("/")) {
 	if (fpath.ends_with("/")) {
 		if (fpath != "res://") {
 		if (fpath != "res://") {
@@ -1502,7 +1502,7 @@ void FileSystemDock::_file_list_rmb_option(int p_option) {
 	_file_option(p_option, selected);
 	_file_option(p_option, selected);
 }
 }
 
 
-void FileSystemDock::_file_option(int p_option, const Vector<String> p_selected) {
+void FileSystemDock::_file_option(int p_option, const Vector<String> &p_selected) {
 	// The first one should be the active item
 	// The first one should be the active item
 
 
 	switch (p_option) {
 	switch (p_option) {

+ 3 - 3
editor/filesystem_dock.h

@@ -175,7 +175,7 @@ private:
 	Ref<Texture> _get_tree_item_icon(EditorFileSystemDirectory *p_dir, int p_idx);
 	Ref<Texture> _get_tree_item_icon(EditorFileSystemDirectory *p_dir, int p_idx);
 	bool _create_tree(TreeItem *p_parent, EditorFileSystemDirectory *p_dir, Vector<String> &uncollapsed_paths, bool p_select_in_favorites);
 	bool _create_tree(TreeItem *p_parent, EditorFileSystemDirectory *p_dir, Vector<String> &uncollapsed_paths, bool p_select_in_favorites);
 	Vector<String> _compute_uncollapsed_paths();
 	Vector<String> _compute_uncollapsed_paths();
-	void _update_tree(const Vector<String> p_uncollapsed_paths = Vector<String>(), bool p_uncollapse_root = false, bool p_select_in_favorites = false);
+	void _update_tree(const Vector<String> &p_uncollapsed_paths = Vector<String>(), bool p_uncollapse_root = false, bool p_select_in_favorites = false);
 	void _navigate_to_path(const String &p_path, bool p_select_in_favorites = false);
 	void _navigate_to_path(const String &p_path, bool p_select_in_favorites = false);
 
 
 	void _file_list_gui_input(Ref<InputEvent> p_event);
 	void _file_list_gui_input(Ref<InputEvent> p_event);
@@ -188,7 +188,7 @@ private:
 
 
 	void _tree_toggle_collapsed();
 	void _tree_toggle_collapsed();
 
 
-	void _select_file(const String p_path, bool p_select_in_favorites = false);
+	void _select_file(const String &p_path, bool p_select_in_favorites = false);
 	void _tree_activate_file();
 	void _tree_activate_file();
 	void _file_list_activate_file(int p_idx);
 	void _file_list_activate_file(int p_idx);
 	void _file_multi_selected(int p_index, bool p_selected);
 	void _file_multi_selected(int p_index, bool p_selected);
@@ -221,7 +221,7 @@ private:
 
 
 	void _tree_rmb_option(int p_option);
 	void _tree_rmb_option(int p_option);
 	void _file_list_rmb_option(int p_option);
 	void _file_list_rmb_option(int p_option);
-	void _file_option(int p_option, const Vector<String> p_selected);
+	void _file_option(int p_option, const Vector<String> &p_selected);
 
 
 	void _fw_history();
 	void _fw_history();
 	void _bw_history();
 	void _bw_history();

+ 1 - 1
editor/plugins/curve_editor_plugin.cpp

@@ -783,7 +783,7 @@ bool CurvePreviewGenerator::handles(const String &p_type) const {
 	return p_type == "Curve";
 	return p_type == "Curve";
 }
 }
 
 
-Ref<Texture> CurvePreviewGenerator::generate(const Ref<Resource> &p_from, const Size2 p_size) const {
+Ref<Texture> CurvePreviewGenerator::generate(const Ref<Resource> &p_from, const Size2 &p_size) const {
 
 
 	Ref<Curve> curve_ref = p_from;
 	Ref<Curve> curve_ref = p_from;
 	ERR_FAIL_COND_V(curve_ref.is_null(), Ref<Texture>());
 	ERR_FAIL_COND_V(curve_ref.is_null(), Ref<Texture>());

+ 1 - 1
editor/plugins/curve_editor_plugin.h

@@ -142,7 +142,7 @@ class CurvePreviewGenerator : public EditorResourcePreviewGenerator {
 
 
 public:
 public:
 	virtual bool handles(const String &p_type) const;
 	virtual bool handles(const String &p_type) const;
-	virtual Ref<Texture> generate(const Ref<Resource> &p_from, const Size2 p_size) const;
+	virtual Ref<Texture> generate(const Ref<Resource> &p_from, const Size2 &p_size) const;
 };
 };
 
 
 #endif // CURVE_EDITOR_PLUGIN_H
 #endif // CURVE_EDITOR_PLUGIN_H

+ 11 - 11
editor/plugins/editor_preview_plugins.cpp

@@ -82,7 +82,7 @@ bool EditorTexturePreviewPlugin::generate_small_preview_automatically() const {
 	return true;
 	return true;
 }
 }
 
 
-Ref<Texture> EditorTexturePreviewPlugin::generate(const RES &p_from, const Size2 p_size) const {
+Ref<Texture> EditorTexturePreviewPlugin::generate(const RES &p_from, const Size2 &p_size) const {
 
 
 	Ref<Image> img;
 	Ref<Image> img;
 	Ref<AtlasTexture> atex = p_from;
 	Ref<AtlasTexture> atex = p_from;
@@ -148,7 +148,7 @@ bool EditorImagePreviewPlugin::handles(const String &p_type) const {
 	return p_type == "Image";
 	return p_type == "Image";
 }
 }
 
 
-Ref<Texture> EditorImagePreviewPlugin::generate(const RES &p_from, const Size2 p_size) const {
+Ref<Texture> EditorImagePreviewPlugin::generate(const RES &p_from, const Size2 &p_size) const {
 
 
 	Ref<Image> img = p_from;
 	Ref<Image> img = p_from;
 
 
@@ -196,7 +196,7 @@ bool EditorBitmapPreviewPlugin::handles(const String &p_type) const {
 	return ClassDB::is_parent_class(p_type, "BitMap");
 	return ClassDB::is_parent_class(p_type, "BitMap");
 }
 }
 
 
-Ref<Texture> EditorBitmapPreviewPlugin::generate(const RES &p_from, const Size2 p_size) const {
+Ref<Texture> EditorBitmapPreviewPlugin::generate(const RES &p_from, const Size2 &p_size) const {
 
 
 	Ref<BitMap> bm = p_from;
 	Ref<BitMap> bm = p_from;
 
 
@@ -263,12 +263,12 @@ bool EditorPackedScenePreviewPlugin::handles(const String &p_type) const {
 
 
 	return ClassDB::is_parent_class(p_type, "PackedScene");
 	return ClassDB::is_parent_class(p_type, "PackedScene");
 }
 }
-Ref<Texture> EditorPackedScenePreviewPlugin::generate(const RES &p_from, const Size2 p_size) const {
+Ref<Texture> EditorPackedScenePreviewPlugin::generate(const RES &p_from, const Size2 &p_size) const {
 
 
 	return generate_from_path(p_from->get_path(), p_size);
 	return generate_from_path(p_from->get_path(), p_size);
 }
 }
 
 
-Ref<Texture> EditorPackedScenePreviewPlugin::generate_from_path(const String &p_path, const Size2 p_size) const {
+Ref<Texture> EditorPackedScenePreviewPlugin::generate_from_path(const String &p_path, const Size2 &p_size) const {
 
 
 	String temp_path = EditorSettings::get_singleton()->get_cache_dir();
 	String temp_path = EditorSettings::get_singleton()->get_cache_dir();
 	String cache_base = ProjectSettings::get_singleton()->globalize_path(p_path).md5_text();
 	String cache_base = ProjectSettings::get_singleton()->globalize_path(p_path).md5_text();
@@ -321,7 +321,7 @@ bool EditorMaterialPreviewPlugin::generate_small_preview_automatically() const {
 	return true;
 	return true;
 }
 }
 
 
-Ref<Texture> EditorMaterialPreviewPlugin::generate(const RES &p_from, const Size2 p_size) const {
+Ref<Texture> EditorMaterialPreviewPlugin::generate(const RES &p_from, const Size2 &p_size) const {
 
 
 	Ref<Material> material = p_from;
 	Ref<Material> material = p_from;
 	ERR_FAIL_COND_V(material.is_null(), Ref<Texture>());
 	ERR_FAIL_COND_V(material.is_null(), Ref<Texture>());
@@ -487,7 +487,7 @@ bool EditorScriptPreviewPlugin::handles(const String &p_type) const {
 	return ClassDB::is_parent_class(p_type, "Script");
 	return ClassDB::is_parent_class(p_type, "Script");
 }
 }
 
 
-Ref<Texture> EditorScriptPreviewPlugin::generate(const RES &p_from, const Size2 p_size) const {
+Ref<Texture> EditorScriptPreviewPlugin::generate(const RES &p_from, const Size2 &p_size) const {
 
 
 	Ref<Script> scr = p_from;
 	Ref<Script> scr = p_from;
 	if (scr.is_null())
 	if (scr.is_null())
@@ -609,7 +609,7 @@ bool EditorAudioStreamPreviewPlugin::handles(const String &p_type) const {
 	return ClassDB::is_parent_class(p_type, "AudioStream");
 	return ClassDB::is_parent_class(p_type, "AudioStream");
 }
 }
 
 
-Ref<Texture> EditorAudioStreamPreviewPlugin::generate(const RES &p_from, const Size2 p_size) const {
+Ref<Texture> EditorAudioStreamPreviewPlugin::generate(const RES &p_from, const Size2 &p_size) const {
 
 
 	Ref<AudioStream> stream = p_from;
 	Ref<AudioStream> stream = p_from;
 	ERR_FAIL_COND_V(stream.is_null(), Ref<Texture>());
 	ERR_FAIL_COND_V(stream.is_null(), Ref<Texture>());
@@ -706,7 +706,7 @@ bool EditorMeshPreviewPlugin::handles(const String &p_type) const {
 	return ClassDB::is_parent_class(p_type, "Mesh"); //any Mesh
 	return ClassDB::is_parent_class(p_type, "Mesh"); //any Mesh
 }
 }
 
 
-Ref<Texture> EditorMeshPreviewPlugin::generate(const RES &p_from, const Size2 p_size) const {
+Ref<Texture> EditorMeshPreviewPlugin::generate(const RES &p_from, const Size2 &p_size) const {
 
 
 	Ref<Mesh> mesh = p_from;
 	Ref<Mesh> mesh = p_from;
 	ERR_FAIL_COND_V(mesh.is_null(), Ref<Texture>());
 	ERR_FAIL_COND_V(mesh.is_null(), Ref<Texture>());
@@ -827,7 +827,7 @@ bool EditorFontPreviewPlugin::handles(const String &p_type) const {
 	return ClassDB::is_parent_class(p_type, "DynamicFontData");
 	return ClassDB::is_parent_class(p_type, "DynamicFontData");
 }
 }
 
 
-Ref<Texture> EditorFontPreviewPlugin::generate_from_path(const String &p_path, const Size2 p_size) const {
+Ref<Texture> EditorFontPreviewPlugin::generate_from_path(const String &p_path, const Size2 &p_size) const {
 
 
 	Ref<DynamicFontData> SampledFont;
 	Ref<DynamicFontData> SampledFont;
 	SampledFont.instance();
 	SampledFont.instance();
@@ -882,7 +882,7 @@ Ref<Texture> EditorFontPreviewPlugin::generate_from_path(const String &p_path, c
 	return ptex;
 	return ptex;
 }
 }
 
 
-Ref<Texture> EditorFontPreviewPlugin::generate(const RES &p_from, const Size2 p_size) const {
+Ref<Texture> EditorFontPreviewPlugin::generate(const RES &p_from, const Size2 &p_size) const {
 
 
 	String path = p_from->get_path();
 	String path = p_from->get_path();
 	if (!FileAccess::exists(path)) {
 	if (!FileAccess::exists(path)) {

+ 11 - 11
editor/plugins/editor_preview_plugins.h

@@ -41,7 +41,7 @@ class EditorTexturePreviewPlugin : public EditorResourcePreviewGenerator {
 public:
 public:
 	virtual bool handles(const String &p_type) const;
 	virtual bool handles(const String &p_type) const;
 	virtual bool generate_small_preview_automatically() const;
 	virtual bool generate_small_preview_automatically() const;
-	virtual Ref<Texture> generate(const RES &p_from, const Size2 p_size) const;
+	virtual Ref<Texture> generate(const RES &p_from, const Size2 &p_size) const;
 
 
 	EditorTexturePreviewPlugin();
 	EditorTexturePreviewPlugin();
 };
 };
@@ -52,7 +52,7 @@ class EditorImagePreviewPlugin : public EditorResourcePreviewGenerator {
 public:
 public:
 	virtual bool handles(const String &p_type) const;
 	virtual bool handles(const String &p_type) const;
 	virtual bool generate_small_preview_automatically() const;
 	virtual bool generate_small_preview_automatically() const;
-	virtual Ref<Texture> generate(const RES &p_from, const Size2 p_size) const;
+	virtual Ref<Texture> generate(const RES &p_from, const Size2 &p_size) const;
 
 
 	EditorImagePreviewPlugin();
 	EditorImagePreviewPlugin();
 };
 };
@@ -63,7 +63,7 @@ class EditorBitmapPreviewPlugin : public EditorResourcePreviewGenerator {
 public:
 public:
 	virtual bool handles(const String &p_type) const;
 	virtual bool handles(const String &p_type) const;
 	virtual bool generate_small_preview_automatically() const;
 	virtual bool generate_small_preview_automatically() const;
-	virtual Ref<Texture> generate(const RES &p_from, const Size2 p_size) const;
+	virtual Ref<Texture> generate(const RES &p_from, const Size2 &p_size) const;
 
 
 	EditorBitmapPreviewPlugin();
 	EditorBitmapPreviewPlugin();
 };
 };
@@ -72,8 +72,8 @@ class EditorPackedScenePreviewPlugin : public EditorResourcePreviewGenerator {
 
 
 public:
 public:
 	virtual bool handles(const String &p_type) const;
 	virtual bool handles(const String &p_type) const;
-	virtual Ref<Texture> generate(const RES &p_from, const Size2 p_size) const;
-	virtual Ref<Texture> generate_from_path(const String &p_path, const Size2 p_size) const;
+	virtual Ref<Texture> generate(const RES &p_from, const Size2 &p_size) const;
+	virtual Ref<Texture> generate_from_path(const String &p_path, const Size2 &p_size) const;
 
 
 	EditorPackedScenePreviewPlugin();
 	EditorPackedScenePreviewPlugin();
 };
 };
@@ -102,7 +102,7 @@ protected:
 public:
 public:
 	virtual bool handles(const String &p_type) const;
 	virtual bool handles(const String &p_type) const;
 	virtual bool generate_small_preview_automatically() const;
 	virtual bool generate_small_preview_automatically() const;
-	virtual Ref<Texture> generate(const RES &p_from, const Size2 p_size) const;
+	virtual Ref<Texture> generate(const RES &p_from, const Size2 &p_size) const;
 
 
 	EditorMaterialPreviewPlugin();
 	EditorMaterialPreviewPlugin();
 	~EditorMaterialPreviewPlugin();
 	~EditorMaterialPreviewPlugin();
@@ -111,7 +111,7 @@ public:
 class EditorScriptPreviewPlugin : public EditorResourcePreviewGenerator {
 class EditorScriptPreviewPlugin : public EditorResourcePreviewGenerator {
 public:
 public:
 	virtual bool handles(const String &p_type) const;
 	virtual bool handles(const String &p_type) const;
-	virtual Ref<Texture> generate(const RES &p_from, const Size2 p_size) const;
+	virtual Ref<Texture> generate(const RES &p_from, const Size2 &p_size) const;
 
 
 	EditorScriptPreviewPlugin();
 	EditorScriptPreviewPlugin();
 };
 };
@@ -119,7 +119,7 @@ public:
 class EditorAudioStreamPreviewPlugin : public EditorResourcePreviewGenerator {
 class EditorAudioStreamPreviewPlugin : public EditorResourcePreviewGenerator {
 public:
 public:
 	virtual bool handles(const String &p_type) const;
 	virtual bool handles(const String &p_type) const;
-	virtual Ref<Texture> generate(const RES &p_from, const Size2 p_size) const;
+	virtual Ref<Texture> generate(const RES &p_from, const Size2 &p_size) const;
 
 
 	EditorAudioStreamPreviewPlugin();
 	EditorAudioStreamPreviewPlugin();
 };
 };
@@ -146,7 +146,7 @@ protected:
 
 
 public:
 public:
 	virtual bool handles(const String &p_type) const;
 	virtual bool handles(const String &p_type) const;
-	virtual Ref<Texture> generate(const RES &p_from, const Size2 p_size) const;
+	virtual Ref<Texture> generate(const RES &p_from, const Size2 &p_size) const;
 
 
 	EditorMeshPreviewPlugin();
 	EditorMeshPreviewPlugin();
 	~EditorMeshPreviewPlugin();
 	~EditorMeshPreviewPlugin();
@@ -169,8 +169,8 @@ protected:
 
 
 public:
 public:
 	virtual bool handles(const String &p_type) const;
 	virtual bool handles(const String &p_type) const;
-	virtual Ref<Texture> generate(const RES &p_from, const Size2 p_size) const;
-	virtual Ref<Texture> generate_from_path(const String &p_path, const Size2 p_size) const;
+	virtual Ref<Texture> generate(const RES &p_from, const Size2 &p_size) const;
+	virtual Ref<Texture> generate_from_path(const String &p_path, const Size2 &p_size) const;
 
 
 	EditorFontPreviewPlugin();
 	EditorFontPreviewPlugin();
 	~EditorFontPreviewPlugin();
 	~EditorFontPreviewPlugin();

+ 1 - 1
editor/plugins/spatial_editor_plugin.cpp

@@ -3207,7 +3207,7 @@ Vector3 SpatialEditorViewport::_get_instance_position(const Point2 &p_pos) const
 	return point + offset;
 	return point + offset;
 }
 }
 
 
-AABB SpatialEditorViewport::_calculate_spatial_bounds(const Spatial *p_parent, const AABB p_bounds) {
+AABB SpatialEditorViewport::_calculate_spatial_bounds(const Spatial *p_parent, const AABB &p_bounds) {
 	AABB bounds = p_bounds;
 	AABB bounds = p_bounds;
 	for (int i = 0; i < p_parent->get_child_count(); i++) {
 	for (int i = 0; i < p_parent->get_child_count(); i++) {
 		Spatial *child = Object::cast_to<Spatial>(p_parent->get_child(i));
 		Spatial *child = Object::cast_to<Spatial>(p_parent->get_child(i));

+ 1 - 1
editor/plugins/spatial_editor_plugin.h

@@ -376,7 +376,7 @@ private:
 	Point2i _get_warped_mouse_motion(const Ref<InputEventMouseMotion> &p_ev_mouse_motion) const;
 	Point2i _get_warped_mouse_motion(const Ref<InputEventMouseMotion> &p_ev_mouse_motion) const;
 
 
 	Vector3 _get_instance_position(const Point2 &p_pos) const;
 	Vector3 _get_instance_position(const Point2 &p_pos) const;
-	static AABB _calculate_spatial_bounds(const Spatial *p_parent, const AABB p_bounds);
+	static AABB _calculate_spatial_bounds(const Spatial *p_parent, const AABB &p_bounds);
 	void _create_preview(const Vector<String> &files) const;
 	void _create_preview(const Vector<String> &files) const;
 	void _remove_preview();
 	void _remove_preview();
 	bool _cyclical_dependency_exists(const String &p_target_scene_path, Node *p_desired_node);
 	bool _cyclical_dependency_exists(const String &p_target_scene_path, Node *p_desired_node);

+ 5 - 5
editor/plugins/tile_map_editor_plugin.cpp

@@ -281,7 +281,7 @@ void TileMapEditor::_finish_undo() {
 	undo_redo->commit_action();
 	undo_redo->commit_action();
 }
 }
 
 
-void TileMapEditor::_set_cell(const Point2i &p_pos, Vector<int> p_values, bool p_flip_h, bool p_flip_v, bool p_transpose, const Point2i p_autotile_coord) {
+void TileMapEditor::_set_cell(const Point2i &p_pos, Vector<int> p_values, bool p_flip_h, bool p_flip_v, bool p_transpose, const Point2i &p_autotile_coord) {
 
 
 	ERR_FAIL_COND(!node);
 	ERR_FAIL_COND(!node);
 
 
@@ -693,7 +693,7 @@ PoolVector<Vector2> TileMapEditor::_bucket_fill(const Point2i &p_start, bool era
 	return preview ? bucket_cache : points;
 	return preview ? bucket_cache : points;
 }
 }
 
 
-void TileMapEditor::_fill_points(const PoolVector<Vector2> p_points, const Dictionary &p_op) {
+void TileMapEditor::_fill_points(const PoolVector<Vector2> &p_points, const Dictionary &p_op) {
 
 
 	int len = p_points.size();
 	int len = p_points.size();
 	PoolVector<Vector2>::Read pr = p_points.read();
 	PoolVector<Vector2>::Read pr = p_points.read();
@@ -711,7 +711,7 @@ void TileMapEditor::_fill_points(const PoolVector<Vector2> p_points, const Dicti
 		node->update_dirty_bitmask();
 		node->update_dirty_bitmask();
 }
 }
 
 
-void TileMapEditor::_erase_points(const PoolVector<Vector2> p_points) {
+void TileMapEditor::_erase_points(const PoolVector<Vector2> &p_points) {
 
 
 	int len = p_points.size();
 	int len = p_points.size();
 	PoolVector<Vector2>::Read pr = p_points.read();
 	PoolVector<Vector2>::Read pr = p_points.read();
@@ -754,7 +754,7 @@ void TileMapEditor::_erase_selection() {
 	}
 	}
 }
 }
 
 
-void TileMapEditor::_draw_cell(Control *p_viewport, int p_cell, const Point2i &p_point, bool p_flip_h, bool p_flip_v, bool p_transpose, const Point2i p_autotile_coord, const Transform2D &p_xform) {
+void TileMapEditor::_draw_cell(Control *p_viewport, int p_cell, const Point2i &p_point, bool p_flip_h, bool p_flip_v, bool p_transpose, const Point2i &p_autotile_coord, const Transform2D &p_xform) {
 
 
 	Ref<Texture> t = node->get_tileset()->tile_get_texture(p_cell);
 	Ref<Texture> t = node->get_tileset()->tile_get_texture(p_cell);
 
 
@@ -875,7 +875,7 @@ void TileMapEditor::_draw_cell(Control *p_viewport, int p_cell, const Point2i &p
 	}
 	}
 }
 }
 
 
-void TileMapEditor::_draw_fill_preview(Control *p_viewport, int p_cell, const Point2i &p_point, bool p_flip_h, bool p_flip_v, bool p_transpose, const Point2i p_autotile_coord, const Transform2D &p_xform) {
+void TileMapEditor::_draw_fill_preview(Control *p_viewport, int p_cell, const Point2i &p_point, bool p_flip_h, bool p_flip_v, bool p_transpose, const Point2i &p_autotile_coord, const Transform2D &p_xform) {
 
 
 	PoolVector<Vector2> points = _bucket_fill(p_point, false, true);
 	PoolVector<Vector2> points = _bucket_fill(p_point, false, true);
 	PoolVector<Vector2>::Read pr = points.read();
 	PoolVector<Vector2>::Read pr = points.read();

+ 5 - 5
editor/plugins/tile_map_editor_plugin.h

@@ -169,14 +169,14 @@ class TileMapEditor : public VBoxContainer {
 
 
 	PoolVector<Vector2> _bucket_fill(const Point2i &p_start, bool erase = false, bool preview = false);
 	PoolVector<Vector2> _bucket_fill(const Point2i &p_start, bool erase = false, bool preview = false);
 
 
-	void _fill_points(const PoolVector<Vector2> p_points, const Dictionary &p_op);
-	void _erase_points(const PoolVector<Vector2> p_points);
+	void _fill_points(const PoolVector<Vector2> &p_points, const Dictionary &p_op);
+	void _erase_points(const PoolVector<Vector2> &p_points);
 
 
 	void _select(const Point2i &p_from, const Point2i &p_to);
 	void _select(const Point2i &p_from, const Point2i &p_to);
 	void _erase_selection();
 	void _erase_selection();
 
 
-	void _draw_cell(Control *p_viewport, int p_cell, const Point2i &p_point, bool p_flip_h, bool p_flip_v, bool p_transpose, const Point2i p_autotile_coord, const Transform2D &p_xform);
-	void _draw_fill_preview(Control *p_viewport, int p_cell, const Point2i &p_point, bool p_flip_h, bool p_flip_v, bool p_transpose, const Point2i p_autotile_coord, const Transform2D &p_xform);
+	void _draw_cell(Control *p_viewport, int p_cell, const Point2i &p_point, bool p_flip_h, bool p_flip_v, bool p_transpose, const Point2i &p_autotile_coord, const Transform2D &p_xform);
+	void _draw_fill_preview(Control *p_viewport, int p_cell, const Point2i &p_point, bool p_flip_h, bool p_flip_v, bool p_transpose, const Point2i &p_autotile_coord, const Transform2D &p_xform);
 	void _clear_bucket_cache();
 	void _clear_bucket_cache();
 
 
 	void _update_copydata();
 	void _update_copydata();
@@ -200,7 +200,7 @@ class TileMapEditor : public VBoxContainer {
 	void _start_undo(const String &p_action);
 	void _start_undo(const String &p_action);
 	void _finish_undo();
 	void _finish_undo();
 	void _create_set_cell_undo_redo(const Vector2 &p_vec, const CellOp &p_cell_old, const CellOp &p_cell_new);
 	void _create_set_cell_undo_redo(const Vector2 &p_vec, const CellOp &p_cell_old, const CellOp &p_cell_new);
-	void _set_cell(const Point2i &p_pos, Vector<int> p_values, bool p_flip_h = false, bool p_flip_v = false, bool p_transpose = false, const Point2i p_autotile_coord = Point2());
+	void _set_cell(const Point2i &p_pos, Vector<int> p_values, bool p_flip_h = false, bool p_flip_v = false, bool p_transpose = false, const Point2i &p_autotile_coord = Point2());
 
 
 	void _canvas_mouse_enter();
 	void _canvas_mouse_enter();
 	void _canvas_mouse_exit();
 	void _canvas_mouse_exit();

+ 1 - 1
editor/plugins/tile_set_editor_plugin.cpp

@@ -1833,7 +1833,7 @@ Vector<Vector2> TileSetEditor::_get_edited_shape_points() {
 	return _get_collision_shape_points(edited_collision_shape);
 	return _get_collision_shape_points(edited_collision_shape);
 }
 }
 
 
-void TileSetEditor::_set_edited_shape_points(const Vector<Vector2> points) {
+void TileSetEditor::_set_edited_shape_points(const Vector<Vector2> &points) {
 	Ref<ConvexPolygonShape2D> convex = edited_collision_shape;
 	Ref<ConvexPolygonShape2D> convex = edited_collision_shape;
 	Ref<ConcavePolygonShape2D> concave = edited_collision_shape;
 	Ref<ConcavePolygonShape2D> concave = edited_collision_shape;
 	if (convex.is_valid()) {
 	if (convex.is_valid()) {

+ 1 - 1
editor/plugins/tile_set_editor_plugin.h

@@ -201,7 +201,7 @@ private:
 	void _on_grid_snap_toggled(bool p_val);
 	void _on_grid_snap_toggled(bool p_val);
 	Vector<Vector2> _get_collision_shape_points(const Ref<Shape2D> &p_shape);
 	Vector<Vector2> _get_collision_shape_points(const Ref<Shape2D> &p_shape);
 	Vector<Vector2> _get_edited_shape_points();
 	Vector<Vector2> _get_edited_shape_points();
-	void _set_edited_shape_points(const Vector<Vector2> points);
+	void _set_edited_shape_points(const Vector<Vector2> &points);
 	void _update_tile_data();
 	void _update_tile_data();
 	void _update_toggle_shape_button();
 	void _update_toggle_shape_button();
 	void _select_next_tile();
 	void _select_next_tile();

+ 1 - 1
editor/plugins/visual_shader_editor_plugin.cpp

@@ -1395,7 +1395,7 @@ void VisualShaderEditor::_node_selected(Object *p_node) {
 	//EditorNode::get_singleton()->push_item(vsnode.ptr(), "", true);
 	//EditorNode::get_singleton()->push_item(vsnode.ptr(), "", true);
 }
 }
 
 
-void VisualShaderEditor::_graph_gui_input(const Ref<InputEvent> p_event) {
+void VisualShaderEditor::_graph_gui_input(const Ref<InputEvent> &p_event) {
 
 
 	Ref<InputEventMouseButton> mb = p_event;
 	Ref<InputEventMouseButton> mb = p_event;
 
 

+ 1 - 1
editor/plugins/visual_shader_editor_plugin.h

@@ -198,7 +198,7 @@ class VisualShaderEditor : public VBoxContainer {
 	void _node_resized(const Vector2 &p_new_size, int p_type, int p_node);
 	void _node_resized(const Vector2 &p_new_size, int p_type, int p_node);
 
 
 	void _preview_select_port(int p_node, int p_port);
 	void _preview_select_port(int p_node, int p_port);
-	void _graph_gui_input(const Ref<InputEvent> p_event);
+	void _graph_gui_input(const Ref<InputEvent> &p_event);
 
 
 	void _member_filter_changed(const String &p_text);
 	void _member_filter_changed(const String &p_text);
 	void _sbox_input(const Ref<InputEvent> &p_ie);
 	void _sbox_input(const Ref<InputEvent> &p_ie);

+ 1 - 1
modules/gridmap/grid_map_editor_plugin.cpp

@@ -345,7 +345,7 @@ void GridMapEditor::_validate_selection() {
 	_update_selection_transform();
 	_update_selection_transform();
 }
 }
 
 
-void GridMapEditor::_set_selection(bool p_active, const Vector3 p_begin, const Vector3 p_end) {
+void GridMapEditor::_set_selection(bool p_active, const Vector3 &p_begin, const Vector3 &p_end) {
 
 
 	selection.active = p_active;
 	selection.active = p_active;
 	selection.begin = p_begin;
 	selection.begin = p_begin;

+ 1 - 1
modules/gridmap/grid_map_editor_plugin.h

@@ -222,7 +222,7 @@ class GridMapEditor : public VBoxContainer {
 	void _do_paste();
 	void _do_paste();
 	void _update_selection_transform();
 	void _update_selection_transform();
 	void _validate_selection();
 	void _validate_selection();
-	void _set_selection(bool p_active, const Vector3 p_begin = Vector3(), const Vector3 p_end = Vector3());
+	void _set_selection(bool p_active, const Vector3 &p_begin = Vector3(), const Vector3 &p_end = Vector3());
 
 
 	void _floor_changed(float p_value);
 	void _floor_changed(float p_value);
 	void _floor_mouse_exited();
 	void _floor_mouse_exited();

+ 1 - 1
scene/gui/spin_box.cpp

@@ -173,7 +173,7 @@ void SpinBox::_line_edit_focus_exit() {
 	_text_entered(line_edit->get_text());
 	_text_entered(line_edit->get_text());
 }
 }
 
 
-inline void SpinBox::_adjust_width_for_icon(const Ref<Texture> icon) {
+inline void SpinBox::_adjust_width_for_icon(const Ref<Texture> &icon) {
 
 
 	int w = icon->get_width();
 	int w = icon->get_width();
 	if (w != last_w) {
 	if (w != last_w) {

+ 1 - 1
scene/gui/spin_box.h

@@ -62,7 +62,7 @@ class SpinBox : public Range {
 
 
 	void _line_edit_focus_exit();
 	void _line_edit_focus_exit();
 
 
-	inline void _adjust_width_for_icon(const Ref<Texture> icon);
+	inline void _adjust_width_for_icon(const Ref<Texture> &icon);
 
 
 protected:
 protected:
 	void _gui_input(const Ref<InputEvent> &p_event);
 	void _gui_input(const Ref<InputEvent> &p_event);

+ 1 - 1
scene/main/node.cpp

@@ -1759,7 +1759,7 @@ bool Node::has_persistent_groups() const {
 
 
 	return false;
 	return false;
 }
 }
-void Node::_print_tree_pretty(const String prefix, const bool last) {
+void Node::_print_tree_pretty(const String &prefix, const bool last) {
 
 
 	String new_prefix = last ? String::utf8(" ┖╴") : String::utf8(" ┠╴");
 	String new_prefix = last ? String::utf8(" ┖╴") : String::utf8(" ┠╴");
 	print_line(prefix + new_prefix + String(get_name()));
 	print_line(prefix + new_prefix + String(get_name()));

+ 1 - 1
scene/main/node.h

@@ -152,7 +152,7 @@ private:
 
 
 	Ref<MultiplayerAPI> multiplayer;
 	Ref<MultiplayerAPI> multiplayer;
 
 
-	void _print_tree_pretty(const String prefix, const bool last);
+	void _print_tree_pretty(const String &prefix, const bool last);
 	void _print_tree(const Node *p_node);
 	void _print_tree(const Node *p_node);
 
 
 	Node *_get_child_by_name(const StringName &p_name) const;
 	Node *_get_child_by_name(const StringName &p_name) const;

+ 1 - 1
scene/main/scene_tree.cpp

@@ -1249,7 +1249,7 @@ void SceneTree::_update_root_rect() {
 	}
 	}
 }
 }
 
 
-void SceneTree::set_screen_stretch(StretchMode p_mode, StretchAspect p_aspect, const Size2 p_minsize, real_t p_shrink) {
+void SceneTree::set_screen_stretch(StretchMode p_mode, StretchAspect p_aspect, const Size2 &p_minsize, real_t p_shrink) {
 
 
 	stretch_mode = p_mode;
 	stretch_mode = p_mode;
 	stretch_aspect = p_aspect;
 	stretch_aspect = p_aspect;

+ 1 - 1
scene/main/scene_tree.h

@@ -386,7 +386,7 @@ public:
 	void get_nodes_in_group(const StringName &p_group, List<Node *> *p_list);
 	void get_nodes_in_group(const StringName &p_group, List<Node *> *p_list);
 	bool has_group(const StringName &p_identifier) const;
 	bool has_group(const StringName &p_identifier) const;
 
 
-	void set_screen_stretch(StretchMode p_mode, StretchAspect p_aspect, const Size2 p_minsize, real_t p_shrink = 1);
+	void set_screen_stretch(StretchMode p_mode, StretchAspect p_aspect, const Size2 &p_minsize, real_t p_shrink = 1);
 
 
 	void set_use_font_oversampling(bool p_oversampling);
 	void set_use_font_oversampling(bool p_oversampling);
 	bool is_using_font_oversampling() const;
 	bool is_using_font_oversampling() const;

+ 1 - 1
scene/resources/animation.cpp

@@ -863,7 +863,7 @@ Error Animation::transform_track_get_key(int p_track, int p_key, Vector3 *r_loc,
 	return OK;
 	return OK;
 }
 }
 
 
-int Animation::transform_track_insert_key(int p_track, float p_time, const Vector3 p_loc, const Quat &p_rot, const Vector3 &p_scale) {
+int Animation::transform_track_insert_key(int p_track, float p_time, const Vector3 &p_loc, const Quat &p_rot, const Vector3 &p_scale) {
 
 
 	ERR_FAIL_INDEX_V(p_track, tracks.size(), -1);
 	ERR_FAIL_INDEX_V(p_track, tracks.size(), -1);
 	Track *t = tracks[p_track];
 	Track *t = tracks[p_track];

+ 1 - 1
scene/resources/animation.h

@@ -314,7 +314,7 @@ public:
 	float track_get_key_time(int p_track, int p_key_idx) const;
 	float track_get_key_time(int p_track, int p_key_idx) const;
 	float track_get_key_transition(int p_track, int p_key_idx) const;
 	float track_get_key_transition(int p_track, int p_key_idx) const;
 
 
-	int transform_track_insert_key(int p_track, float p_time, const Vector3 p_loc, const Quat &p_rot = Quat(), const Vector3 &p_scale = Vector3());
+	int transform_track_insert_key(int p_track, float p_time, const Vector3 &p_loc, const Quat &p_rot = Quat(), const Vector3 &p_scale = Vector3());
 	Error transform_track_get_key(int p_track, int p_key, Vector3 *r_loc, Quat *r_rot, Vector3 *r_scale) const;
 	Error transform_track_get_key(int p_track, int p_key, Vector3 *r_loc, Quat *r_rot, Vector3 *r_scale) const;
 	void track_set_interpolation_type(int p_track, InterpolationType p_interp);
 	void track_set_interpolation_type(int p_track, InterpolationType p_interp);
 	InterpolationType track_get_interpolation_type(int p_track) const;
 	InterpolationType track_get_interpolation_type(int p_track) const;

+ 1 - 1
scene/resources/surface_tool.cpp

@@ -769,7 +769,7 @@ void SurfaceTool::create_from(const Ref<Mesh> &p_existing, int p_surface) {
 	material = p_existing->surface_get_material(p_surface);
 	material = p_existing->surface_get_material(p_surface);
 }
 }
 
 
-void SurfaceTool::create_from_blend_shape(const Ref<Mesh> &p_existing, int p_surface, const String p_blend_shape_name) {
+void SurfaceTool::create_from_blend_shape(const Ref<Mesh> &p_existing, int p_surface, const String &p_blend_shape_name) {
 	clear();
 	clear();
 	primitive = p_existing->surface_get_primitive_type(p_surface);
 	primitive = p_existing->surface_get_primitive_type(p_surface);
 	Array arr = p_existing->surface_get_blend_shape_arrays(p_surface);
 	Array arr = p_existing->surface_get_blend_shape_arrays(p_surface);

+ 1 - 1
scene/resources/surface_tool.h

@@ -136,7 +136,7 @@ public:
 	static Vector<Vertex> create_vertex_array_from_triangle_arrays(const Array &p_arrays);
 	static Vector<Vertex> create_vertex_array_from_triangle_arrays(const Array &p_arrays);
 	Array commit_to_arrays();
 	Array commit_to_arrays();
 	void create_from(const Ref<Mesh> &p_existing, int p_surface);
 	void create_from(const Ref<Mesh> &p_existing, int p_surface);
-	void create_from_blend_shape(const Ref<Mesh> &p_existing, int p_surface, const String p_blend_shape_name);
+	void create_from_blend_shape(const Ref<Mesh> &p_existing, int p_surface, const String &p_blend_shape_name);
 	void append_from(const Ref<Mesh> &p_existing, int p_surface, const Transform &p_xform);
 	void append_from(const Ref<Mesh> &p_existing, int p_surface, const Transform &p_xform);
 	Ref<ArrayMesh> commit(const Ref<ArrayMesh> &p_existing = Ref<ArrayMesh>(), uint32_t p_flags = Mesh::ARRAY_COMPRESS_DEFAULT);
 	Ref<ArrayMesh> commit(const Ref<ArrayMesh> &p_existing = Ref<ArrayMesh>(), uint32_t p_flags = Mesh::ARRAY_COMPRESS_DEFAULT);
 
 

+ 1 - 1
servers/arvr/arvr_positional_tracker.cpp

@@ -79,7 +79,7 @@ ARVRServer::TrackerType ARVRPositionalTracker::get_type() const {
 	return type;
 	return type;
 };
 };
 
 
-void ARVRPositionalTracker::set_name(const String p_name) {
+void ARVRPositionalTracker::set_name(const String &p_name) {
 	name = p_name;
 	name = p_name;
 };
 };
 
 

+ 1 - 1
servers/arvr/arvr_positional_tracker.h

@@ -73,7 +73,7 @@ protected:
 public:
 public:
 	void set_type(ARVRServer::TrackerType p_type);
 	void set_type(ARVRServer::TrackerType p_type);
 	ARVRServer::TrackerType get_type() const;
 	ARVRServer::TrackerType get_type() const;
-	void set_name(const String p_name);
+	void set_name(const String &p_name);
 	StringName get_name() const;
 	StringName get_name() const;
 	int get_tracker_id() const;
 	int get_tracker_id() const;
 	void set_joy_id(int p_joy_id);
 	void set_joy_id(int p_joy_id);

+ 1 - 1
servers/arvr_server.cpp

@@ -100,7 +100,7 @@ Transform ARVRServer::get_world_origin() const {
 	return world_origin;
 	return world_origin;
 };
 };
 
 
-void ARVRServer::set_world_origin(const Transform p_world_origin) {
+void ARVRServer::set_world_origin(const Transform &p_world_origin) {
 	world_origin = p_world_origin;
 	world_origin = p_world_origin;
 };
 };
 
 

+ 1 - 1
servers/arvr_server.h

@@ -123,7 +123,7 @@ public:
 		and in the virtual world out of sync
 		and in the virtual world out of sync
 	*/
 	*/
 	Transform get_world_origin() const;
 	Transform get_world_origin() const;
-	void set_world_origin(const Transform p_world_origin);
+	void set_world_origin(const Transform &p_world_origin);
 
 
 	/*
 	/*
 		center_on_hmd calculates a new reference frame. This ensures the HMD is positioned to 0,0,0 facing 0,0,-1 (need to verify this direction)
 		center_on_hmd calculates a new reference frame. This ensures the HMD is positioned to 0,0,0 facing 0,0,-1 (need to verify this direction)