Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add const lvalue ref to servers/* container parameters #88972

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions platform/macos/display_server_macos.h
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,8 @@ class DisplayServerMacOS : public DisplayServer {
virtual Color get_base_color() const override;
virtual void set_system_theme_change_callback(const Callable &p_callable) override;

virtual Error dialog_show(String p_title, String p_description, Vector<String> p_buttons, const Callable &p_callback) override;
virtual Error dialog_input_text(String p_title, String p_description, String p_partial, const Callable &p_callback) override;
virtual Error dialog_show(const String &p_title, const String &p_description, const Vector<String> &p_buttons, const Callable &p_callback) override;
virtual Error dialog_input_text(const String &p_title, const String &p_description, const String &p_partial, const Callable &p_callback) override;

virtual Error file_dialog_show(const String &p_title, const String &p_current_directory, const String &p_filename, bool p_show_hidden, FileDialogMode p_mode, const Vector<String> &p_filters, const Callable &p_callback) override;
virtual Error file_dialog_with_options_show(const String &p_title, const String &p_current_directory, const String &p_root, const String &p_filename, bool p_show_hidden, FileDialogMode p_mode, const Vector<String> &p_filters, const TypedArray<Dictionary> &p_options, const Callable &p_callback) override;
Expand Down
4 changes: 2 additions & 2 deletions platform/macos/display_server_macos.mm
Original file line number Diff line number Diff line change
Expand Up @@ -900,7 +900,7 @@
}
}

Error DisplayServerMacOS::dialog_show(String p_title, String p_description, Vector<String> p_buttons, const Callable &p_callback) {
Error DisplayServerMacOS::dialog_show(const String &p_title, const String &p_description, const Vector<String> &p_buttons, const Callable &p_callback) {
_THREAD_SAFE_METHOD_

NSAlert *window = [[NSAlert alloc] init];
Expand Down Expand Up @@ -1190,7 +1190,7 @@
return OK;
}

Error DisplayServerMacOS::dialog_input_text(String p_title, String p_description, String p_partial, const Callable &p_callback) {
Error DisplayServerMacOS::dialog_input_text(const String &p_title, const String &p_description, const String &p_partial, const Callable &p_callback) {
_THREAD_SAFE_METHOD_

NSAlert *window = [[NSAlert alloc] init];
Expand Down
6 changes: 3 additions & 3 deletions servers/audio_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1168,7 +1168,7 @@ float AudioServer::get_playback_speed_scale() const {
return playback_speed_scale;
}

void AudioServer::start_playback_stream(Ref<AudioStreamPlayback> p_playback, const StringName &p_bus, Vector<AudioFrame> p_volume_db_vector, float p_start_time, float p_pitch_scale) {
void AudioServer::start_playback_stream(Ref<AudioStreamPlayback> p_playback, const StringName &p_bus, const Vector<AudioFrame> &p_volume_db_vector, float p_start_time, float p_pitch_scale) {
ERR_FAIL_COND(p_playback.is_null());

HashMap<StringName, Vector<AudioFrame>> map;
Expand Down Expand Up @@ -1242,7 +1242,7 @@ void AudioServer::stop_playback_stream(Ref<AudioStreamPlayback> p_playback) {
} while (!playback_node->state.compare_exchange_strong(old_state, new_state));
}

void AudioServer::set_playback_bus_exclusive(Ref<AudioStreamPlayback> p_playback, const StringName &p_bus, Vector<AudioFrame> p_volumes) {
void AudioServer::set_playback_bus_exclusive(Ref<AudioStreamPlayback> p_playback, const StringName &p_bus, const Vector<AudioFrame> &p_volumes) {
ERR_FAIL_COND(p_volumes.size() != MAX_CHANNELS_PER_BUS);

HashMap<StringName, Vector<AudioFrame>> map;
Expand Down Expand Up @@ -1290,7 +1290,7 @@ void AudioServer::set_playback_bus_volumes_linear(Ref<AudioStreamPlayback> p_pla
bus_details_graveyard.insert(old_bus_details);
}

void AudioServer::set_playback_all_bus_volumes_linear(Ref<AudioStreamPlayback> p_playback, Vector<AudioFrame> p_volumes) {
void AudioServer::set_playback_all_bus_volumes_linear(Ref<AudioStreamPlayback> p_playback, const Vector<AudioFrame> &p_volumes) {
ERR_FAIL_COND(p_playback.is_null());
ERR_FAIL_COND(p_volumes.size() != MAX_CHANNELS_PER_BUS);

Expand Down
6 changes: 3 additions & 3 deletions servers/audio_server.h
Original file line number Diff line number Diff line change
Expand Up @@ -406,14 +406,14 @@ class AudioServer : public Object {
float get_playback_speed_scale() const;

// Convenience method.
void start_playback_stream(Ref<AudioStreamPlayback> p_playback, const StringName &p_bus, Vector<AudioFrame> p_volume_db_vector, float p_start_time = 0, float p_pitch_scale = 1);
void start_playback_stream(Ref<AudioStreamPlayback> p_playback, const StringName &p_bus, const Vector<AudioFrame> &p_volume_db_vector, float p_start_time = 0, float p_pitch_scale = 1);
// Expose all parameters.
void start_playback_stream(Ref<AudioStreamPlayback> p_playback, const HashMap<StringName, Vector<AudioFrame>> &p_bus_volumes, float p_start_time = 0, float p_pitch_scale = 1, float p_highshelf_gain = 0, float p_attenuation_cutoff_hz = 0);
void stop_playback_stream(Ref<AudioStreamPlayback> p_playback);

void set_playback_bus_exclusive(Ref<AudioStreamPlayback> p_playback, const StringName &p_bus, Vector<AudioFrame> p_volumes);
void set_playback_bus_exclusive(Ref<AudioStreamPlayback> p_playback, const StringName &p_bus, const Vector<AudioFrame> &p_volumes);
void set_playback_bus_volumes_linear(Ref<AudioStreamPlayback> p_playback, const HashMap<StringName, Vector<AudioFrame>> &p_bus_volumes);
void set_playback_all_bus_volumes_linear(Ref<AudioStreamPlayback> p_playback, Vector<AudioFrame> p_volumes);
void set_playback_all_bus_volumes_linear(Ref<AudioStreamPlayback> p_playback, const Vector<AudioFrame> &p_volumes);
void set_playback_pitch_scale(Ref<AudioStreamPlayback> p_playback, float p_pitch_scale);
void set_playback_paused(Ref<AudioStreamPlayback> p_playback, bool p_paused);
void set_playback_highshelf_params(Ref<AudioStreamPlayback> p_playback, float p_gain, float p_attenuation_cutoff_hz);
Expand Down
4 changes: 2 additions & 2 deletions servers/camera/camera_feed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ String CameraFeed::get_name() const {
return name;
}

void CameraFeed::set_name(String p_name) {
void CameraFeed::set_name(const String &p_name) {
name = p_name;
}

Expand Down Expand Up @@ -149,7 +149,7 @@ CameraFeed::CameraFeed() {
texture[CameraServer::FEED_CBCR_IMAGE] = RenderingServer::get_singleton()->texture_2d_placeholder_create();
}

CameraFeed::CameraFeed(String p_name, FeedPosition p_position) {
CameraFeed::CameraFeed(const String &p_name, FeedPosition p_position) {
// initialize our feed
id = CameraServer::get_singleton()->get_free_id();
base_width = 0;
Expand Down
4 changes: 2 additions & 2 deletions servers/camera/camera_feed.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class CameraFeed : public RefCounted {
void set_active(bool p_is_active);

String get_name() const;
void set_name(String p_name);
void set_name(const String &p_name);

int get_base_width() const;
int get_base_height() const;
Expand All @@ -94,7 +94,7 @@ class CameraFeed : public RefCounted {
RID get_texture(CameraServer::FeedImage p_which);

CameraFeed();
CameraFeed(String p_name, FeedPosition p_position = CameraFeed::FEED_UNSPECIFIED);
CameraFeed(const String &p_name, FeedPosition p_position = CameraFeed::FEED_UNSPECIFIED);
virtual ~CameraFeed();

FeedDataType get_datatype() const;
Expand Down
4 changes: 2 additions & 2 deletions servers/display_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -642,12 +642,12 @@ bool DisplayServer::get_swap_cancel_ok() {
void DisplayServer::enable_for_stealing_focus(OS::ProcessID pid) {
}

Error DisplayServer::dialog_show(String p_title, String p_description, Vector<String> p_buttons, const Callable &p_callback) {
Error DisplayServer::dialog_show(const String &p_title, const String &p_description, const Vector<String> &p_buttons, const Callable &p_callback) {
WARN_PRINT("Native dialogs not supported by this display server.");
return ERR_UNAVAILABLE;
}

Error DisplayServer::dialog_input_text(String p_title, String p_description, String p_partial, const Callable &p_callback) {
Error DisplayServer::dialog_input_text(const String &p_title, const String &p_description, const String &p_partial, const Callable &p_callback) {
WARN_PRINT("Native dialogs not supported by this display server.");
return ERR_UNAVAILABLE;
}
Expand Down
4 changes: 2 additions & 2 deletions servers/display_server.h
Original file line number Diff line number Diff line change
Expand Up @@ -535,8 +535,8 @@ class DisplayServer : public Object {

virtual void enable_for_stealing_focus(OS::ProcessID pid);

virtual Error dialog_show(String p_title, String p_description, Vector<String> p_buttons, const Callable &p_callback);
virtual Error dialog_input_text(String p_title, String p_description, String p_partial, const Callable &p_callback);
virtual Error dialog_show(const String &p_title, const String &p_description, const Vector<String> &p_buttons, const Callable &p_callback);
virtual Error dialog_input_text(const String &p_title, const String &p_description, const String &p_partial, const Callable &p_callback);

enum FileDialogMode {
FILE_DIALOG_MODE_OPEN_FILE,
Expand Down
2 changes: 1 addition & 1 deletion servers/physics_server_2d.h
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,7 @@ class PhysicsServer2DManager : public Object {

ClassInfo() {}

ClassInfo(String p_name, Callable p_create_callback) :
ClassInfo(const String &p_name, Callable p_create_callback) :
name(p_name),
create_callback(p_create_callback) {}

Expand Down
2 changes: 1 addition & 1 deletion servers/physics_server_3d.h
Original file line number Diff line number Diff line change
Expand Up @@ -997,7 +997,7 @@ class PhysicsServer3DManager : public Object {

ClassInfo() {}

ClassInfo(String p_name, Callable p_create_callback) :
ClassInfo(const String &p_name, Callable p_create_callback) :
name(p_name),
create_callback(p_create_callback) {}

Expand Down
2 changes: 1 addition & 1 deletion servers/rendering/renderer_rd/effects/copy_effects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1096,7 +1096,7 @@ void CopyEffects::cubemap_downsample_raster(RID p_source_cubemap, RID p_dest_fra
RD::get_singleton()->draw_list_end();
}

void CopyEffects::cubemap_filter(RID p_source_cubemap, Vector<RID> p_dest_cubemap, bool p_use_array) {
void CopyEffects::cubemap_filter(RID p_source_cubemap, const Vector<RID> &p_dest_cubemap, bool p_use_array) {
ERR_FAIL_COND_MSG(prefer_raster_effects, "Can't use compute based cubemap filter with the mobile renderer.");

UniformSetCacheRD *uniform_set_cache = UniformSetCacheRD::get_singleton();
Expand Down
2 changes: 1 addition & 1 deletion servers/rendering/renderer_rd/effects/copy_effects.h
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ class CopyEffects {
void copy_cubemap_to_dp(RID p_source_rd_texture, RID p_dst_framebuffer, const Rect2 &p_rect, const Vector2 &p_dst_size, float p_z_near, float p_z_far, bool p_dp_flip);
void cubemap_downsample(RID p_source_cubemap, RID p_dest_cubemap, const Size2i &p_size);
void cubemap_downsample_raster(RID p_source_cubemap, RID p_dest_framebuffer, uint32_t p_face_id, const Size2i &p_size);
void cubemap_filter(RID p_source_cubemap, Vector<RID> p_dest_cubemap, bool p_use_array);
void cubemap_filter(RID p_source_cubemap, const Vector<RID> &p_dest_cubemap, bool p_use_array);
void cubemap_filter_raster(RID p_source_cubemap, RID p_dest_framebuffer, uint32_t p_face_id, uint32_t p_mip_level);

void cubemap_roughness(RID p_source_rd_texture, RID p_dest_texture, uint32_t p_face_id, uint32_t p_sample_count, float p_roughness, float p_size);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ SceneShaderForwardClustered::~SceneShaderForwardClustered() {
material_storage->material_free(debug_shadow_splits_material);
}

void SceneShaderForwardClustered::init(const String p_defines) {
void SceneShaderForwardClustered::init(const String &p_defines) {
RendererRD::MaterialStorage *material_storage = RendererRD::MaterialStorage::get_singleton();

{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ class SceneShaderForwardClustered {
SceneShaderForwardClustered();
~SceneShaderForwardClustered();

void init(const String p_defines);
void init(const String &p_defines);
void set_default_specialization_constants(const Vector<RD::PipelineSpecializationConstant> &p_constants);
void enable_advanced_shader_group(bool p_needs_multiview = false);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ SceneShaderForwardMobile::SceneShaderForwardMobile() {
singleton = this;
}

void SceneShaderForwardMobile::init(const String p_defines) {
void SceneShaderForwardMobile::init(const String &p_defines) {
RendererRD::MaterialStorage *material_storage = RendererRD::MaterialStorage::get_singleton();

/* SCENE SHADER */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ class SceneShaderForwardMobile {

Vector<RD::PipelineSpecializationConstant> default_specialization_constants;

void init(const String p_defines);
void init(const String &p_defines);
void set_default_specialization_constants(const Vector<RD::PipelineSpecializationConstant> &p_constants);
};

Expand Down
2 changes: 1 addition & 1 deletion servers/rendering/renderer_scene_cull.h
Original file line number Diff line number Diff line change
Expand Up @@ -1314,7 +1314,7 @@ class RendererSceneCull : public RenderingMethod {
PASS1RC(float, environment_get_volumetric_fog_ambient_inject, RID)

// Glow
PASS13(environment_set_glow, RID, bool, Vector<float>, float, float, float, float, RS::EnvironmentGlowBlendMode, float, float, float, float, RID)
PASS13(environment_set_glow, RID, bool, const Vector<float> &, float, float, float, float, RS::EnvironmentGlowBlendMode, float, float, float, float, RID)

PASS1RC(bool, environment_get_glow_enabled, RID)
PASS1RC(Vector<float>, environment_get_glow_levels, RID)
Expand Down
2 changes: 1 addition & 1 deletion servers/rendering/renderer_scene_render.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ float RendererSceneRender::environment_get_volumetric_fog_ambient_inject(RID p_e

// GLOW

void RendererSceneRender::environment_set_glow(RID p_env, bool p_enable, Vector<float> p_levels, float p_intensity, float p_strength, float p_mix, float p_bloom_threshold, RS::EnvironmentGlowBlendMode p_blend_mode, float p_hdr_bleed_threshold, float p_hdr_bleed_scale, float p_hdr_luminance_cap, float p_glow_map_strength, RID p_glow_map) {
void RendererSceneRender::environment_set_glow(RID p_env, bool p_enable, const Vector<float> &p_levels, float p_intensity, float p_strength, float p_mix, float p_bloom_threshold, RS::EnvironmentGlowBlendMode p_blend_mode, float p_hdr_bleed_threshold, float p_hdr_bleed_scale, float p_hdr_luminance_cap, float p_glow_map_strength, RID p_glow_map) {
environment_storage.environment_set_glow(p_env, p_enable, p_levels, p_intensity, p_strength, p_mix, p_bloom_threshold, p_blend_mode, p_hdr_bleed_threshold, p_hdr_bleed_scale, p_hdr_luminance_cap, p_glow_map_strength, p_glow_map);
}

Expand Down
2 changes: 1 addition & 1 deletion servers/rendering/renderer_scene_render.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ class RendererSceneRender {
virtual void environment_set_volumetric_fog_filter_active(bool p_enable) = 0;

// GLOW
void environment_set_glow(RID p_env, bool p_enable, Vector<float> p_levels, float p_intensity, float p_strength, float p_mix, float p_bloom_threshold, RS::EnvironmentGlowBlendMode p_blend_mode, float p_hdr_bleed_threshold, float p_hdr_bleed_scale, float p_hdr_luminance_cap, float p_glow_map_strength, RID p_glow_map);
void environment_set_glow(RID p_env, bool p_enable, const Vector<float> &p_levels, float p_intensity, float p_strength, float p_mix, float p_bloom_threshold, RS::EnvironmentGlowBlendMode p_blend_mode, float p_hdr_bleed_threshold, float p_hdr_bleed_scale, float p_hdr_luminance_cap, float p_glow_map_strength, RID p_glow_map);
bool environment_get_glow_enabled(RID p_env) const;
Vector<float> environment_get_glow_levels(RID p_env) const;
float environment_get_glow_intensity(RID p_env) const;
Expand Down
2 changes: 1 addition & 1 deletion servers/rendering/renderer_viewport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1506,7 +1506,7 @@ bool RendererViewport::free(RID p_rid) {
return false;
}

void RendererViewport::handle_timestamp(String p_timestamp, uint64_t p_cpu_time, uint64_t p_gpu_time) {
void RendererViewport::handle_timestamp(const String &p_timestamp, uint64_t p_cpu_time, uint64_t p_gpu_time) {
RID *vp = timestamp_vp_map.getptr(p_timestamp);
if (!vp) {
return;
Expand Down
2 changes: 1 addition & 1 deletion servers/rendering/renderer_viewport.h
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ class RendererViewport {
void viewport_set_vrs_update_mode(RID p_viewport, RS::ViewportVRSUpdateMode p_mode);
void viewport_set_vrs_texture(RID p_viewport, RID p_texture);

void handle_timestamp(String p_timestamp, uint64_t p_cpu_time, uint64_t p_gpu_time);
void handle_timestamp(const String &p_timestamp, uint64_t p_cpu_time, uint64_t p_gpu_time);

void draw_viewports(bool p_swap_buffers);

Expand Down
2 changes: 1 addition & 1 deletion servers/rendering/rendering_device_binds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

#include "rendering_device_binds.h"

Error RDShaderFile::parse_versions_from_text(const String &p_text, const String p_defines, OpenIncludeFunction p_include_func, void *p_include_func_userdata) {
Error RDShaderFile::parse_versions_from_text(const String &p_text, const String &p_defines, OpenIncludeFunction p_include_func, void *p_include_func_userdata) {
ERR_FAIL_NULL_V(RenderingDevice::get_singleton(), ERR_UNAVAILABLE);

Vector<String> lines = p_text.split("\n");
Expand Down
2 changes: 1 addition & 1 deletion servers/rendering/rendering_device_binds.h
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ class RDShaderFile : public Resource {
}

typedef String (*OpenIncludeFunction)(const String &, void *userdata);
Error parse_versions_from_text(const String &p_text, const String p_defines = String(), OpenIncludeFunction p_include_func = nullptr, void *p_include_func_userdata = nullptr);
Error parse_versions_from_text(const String &p_text, const String &p_defines = String(), OpenIncludeFunction p_include_func = nullptr, void *p_include_func_userdata = nullptr);

protected:
Dictionary _get_versions() const {
Expand Down
2 changes: 1 addition & 1 deletion servers/rendering/rendering_method.h
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ class RenderingMethod {

// Glow

virtual void environment_set_glow(RID p_env, bool p_enable, Vector<float> p_levels, float p_intensity, float p_strength, float p_mix, float p_bloom_threshold, RS::EnvironmentGlowBlendMode p_blend_mode, float p_hdr_bleed_threshold, float p_hdr_bleed_scale, float p_hdr_luminance_cap, float p_glow_map_strength, RID p_glow_map) = 0;
virtual void environment_set_glow(RID p_env, bool p_enable, const Vector<float> &p_levels, float p_intensity, float p_strength, float p_mix, float p_bloom_threshold, RS::EnvironmentGlowBlendMode p_blend_mode, float p_hdr_bleed_threshold, float p_hdr_bleed_scale, float p_hdr_luminance_cap, float p_glow_map_strength, RID p_glow_map) = 0;

virtual bool environment_get_glow_enabled(RID p_env) const = 0;
virtual Vector<float> environment_get_glow_levels(RID p_env) const = 0;
Expand Down
2 changes: 1 addition & 1 deletion servers/rendering/rendering_server_default.h
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,7 @@ class RenderingServerDefault : public RenderingServer {
FUNC6(environment_set_ssil, RID, bool, float, float, float, float)
FUNC6(environment_set_ssil_quality, EnvironmentSSILQuality, bool, float, int, float, float)

FUNC13(environment_set_glow, RID, bool, Vector<float>, float, float, float, float, EnvironmentGlowBlendMode, float, float, float, float, RID)
FUNC13(environment_set_glow, RID, bool, const Vector<float> &, float, float, float, float, EnvironmentGlowBlendMode, float, float, float, float, RID)
FUNC1(environment_glow_set_use_bicubic_upscale, bool)

FUNC4(environment_set_tonemap, RID, EnvironmentToneMapper, float, float)
Expand Down
4 changes: 2 additions & 2 deletions servers/rendering/shader_language.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3558,7 +3558,7 @@ bool ShaderLanguage::_validate_function_call(BlockNode *p_block, const FunctionI
return false;
}

bool ShaderLanguage::_compare_datatypes(DataType p_datatype_a, String p_datatype_name_a, int p_array_size_a, DataType p_datatype_b, String p_datatype_name_b, int p_array_size_b) {
bool ShaderLanguage::_compare_datatypes(DataType p_datatype_a, const String &p_datatype_name_a, int p_array_size_a, DataType p_datatype_b, const String &p_datatype_name_b, int p_array_size_b) {
bool result = true;

if (p_datatype_a == TYPE_STRUCT || p_datatype_b == TYPE_STRUCT) {
Expand Down Expand Up @@ -4402,7 +4402,7 @@ void ShaderLanguage::get_keyword_list(List<String> *r_keywords) {
}
}

bool ShaderLanguage::is_control_flow_keyword(String p_keyword) {
bool ShaderLanguage::is_control_flow_keyword(const String &p_keyword) {
return p_keyword == "break" ||
p_keyword == "case" ||
p_keyword == "continue" ||
Expand Down
6 changes: 3 additions & 3 deletions servers/rendering/shader_language.h
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,7 @@ class ShaderLanguage {
static uint32_t get_datatype_size(DataType p_type);

static void get_keyword_list(List<String> *r_keywords);
static bool is_control_flow_keyword(String p_keyword);
static bool is_control_flow_keyword(const String &p_keyword);
static void get_builtin_funcs(List<String> *r_keywords);

static int instance_counter;
Expand Down Expand Up @@ -1016,7 +1016,7 @@ class ShaderLanguage {
_set_error(vformat(RTR("Expected a '%s'."), p_what));
}

void _set_expected_error(const String &p_first, const String p_second) {
void _set_expected_error(const String &p_first, const String &p_second) {
_set_error(vformat(RTR("Expected a '%s' or '%s'."), p_first, p_second));
}

Expand Down Expand Up @@ -1119,7 +1119,7 @@ class ShaderLanguage {
static bool is_const_suffix_lut_initialized;

Error _validate_precision(DataType p_type, DataPrecision p_precision);
bool _compare_datatypes(DataType p_datatype_a, String p_datatype_name_a, int p_array_size_a, DataType p_datatype_b, String p_datatype_name_b, int p_array_size_b);
bool _compare_datatypes(DataType p_datatype_a, const String &p_datatype_name_a, int p_array_size_a, DataType p_datatype_b, const String &p_datatype_name_b, int p_array_size_b);
bool _compare_datatypes_in_nodes(Node *a, Node *b);

bool _validate_function_call(BlockNode *p_block, const FunctionInfo &p_function_info, OperatorNode *p_func, DataType *r_ret_type, StringName *r_ret_type_str, bool *r_is_custom_function = nullptr);
Expand Down
Loading
Loading