diff options
author | Yuri Sizov <yuris@humnom.net> | 2022-08-12 23:57:11 +0300 |
---|---|---|
committer | Yuri Sizov <yuris@humnom.net> | 2022-08-22 18:35:11 +0300 |
commit | 1a24c9e14bf1f9578eda338344c12faf66fb0e65 (patch) | |
tree | ada6f4deefe627b4a77133ef3c074e35d6f2a738 /servers/audio | |
parent | fdc36ad08290a8453d26fce3d8b7b13bd8cd5a1a (diff) |
Make `_validate_property` a multilevel method
Diffstat (limited to 'servers/audio')
-rw-r--r-- | servers/audio/effects/audio_effect_chorus.cpp | 8 | ||||
-rw-r--r-- | servers/audio/effects/audio_effect_chorus.h | 2 | ||||
-rw-r--r-- | servers/audio/effects/audio_effect_compressor.cpp | 6 | ||||
-rw-r--r-- | servers/audio/effects/audio_effect_compressor.h | 2 | ||||
-rw-r--r-- | servers/audio/effects/audio_effect_filter.h | 18 |
5 files changed, 18 insertions, 18 deletions
diff --git a/servers/audio/effects/audio_effect_chorus.cpp b/servers/audio/effects/audio_effect_chorus.cpp index e5434eac02..54c08ef644 100644 --- a/servers/audio/effects/audio_effect_chorus.cpp +++ b/servers/audio/effects/audio_effect_chorus.cpp @@ -272,11 +272,11 @@ float AudioEffectChorus::get_dry() const { return dry; } -void AudioEffectChorus::_validate_property(PropertyInfo &property) const { - if (property.name.begins_with("voice/")) { - int voice_idx = property.name.get_slice("/", 1).to_int(); +void AudioEffectChorus::_validate_property(PropertyInfo &p_property) const { + if (p_property.name.begins_with("voice/")) { + int voice_idx = p_property.name.get_slice("/", 1).to_int(); if (voice_idx > voice_count) { - property.usage = PROPERTY_USAGE_NONE; + p_property.usage = PROPERTY_USAGE_NONE; } } } diff --git a/servers/audio/effects/audio_effect_chorus.h b/servers/audio/effects/audio_effect_chorus.h index 72b495f7f9..dd4b431e7a 100644 --- a/servers/audio/effects/audio_effect_chorus.h +++ b/servers/audio/effects/audio_effect_chorus.h @@ -96,7 +96,7 @@ private: float dry; protected: - void _validate_property(PropertyInfo &property) const override; + void _validate_property(PropertyInfo &p_property) const; static void _bind_methods(); diff --git a/servers/audio/effects/audio_effect_compressor.cpp b/servers/audio/effects/audio_effect_compressor.cpp index ee71a6dba7..0e1accba16 100644 --- a/servers/audio/effects/audio_effect_compressor.cpp +++ b/servers/audio/effects/audio_effect_compressor.cpp @@ -184,15 +184,15 @@ StringName AudioEffectCompressor::get_sidechain() const { return sidechain; } -void AudioEffectCompressor::_validate_property(PropertyInfo &property) const { - if (property.name == "sidechain") { +void AudioEffectCompressor::_validate_property(PropertyInfo &p_property) const { + if (p_property.name == "sidechain") { String buses = ""; for (int i = 0; i < AudioServer::get_singleton()->get_bus_count(); i++) { buses += ","; buses += AudioServer::get_singleton()->get_bus_name(i); } - property.hint_string = buses; + p_property.hint_string = buses; } } diff --git a/servers/audio/effects/audio_effect_compressor.h b/servers/audio/effects/audio_effect_compressor.h index 998bd3c978..886255b958 100644 --- a/servers/audio/effects/audio_effect_compressor.h +++ b/servers/audio/effects/audio_effect_compressor.h @@ -61,7 +61,7 @@ class AudioEffectCompressor : public AudioEffect { StringName sidechain; protected: - void _validate_property(PropertyInfo &property) const override; + void _validate_property(PropertyInfo &p_property) const; static void _bind_methods(); public: diff --git a/servers/audio/effects/audio_effect_filter.h b/servers/audio/effects/audio_effect_filter.h index a40af2f13c..1510ee2af7 100644 --- a/servers/audio/effects/audio_effect_filter.h +++ b/servers/audio/effects/audio_effect_filter.h @@ -98,9 +98,9 @@ VARIANT_ENUM_CAST(AudioEffectFilter::FilterDB) class AudioEffectLowPassFilter : public AudioEffectFilter { GDCLASS(AudioEffectLowPassFilter, AudioEffectFilter); - void _validate_property(PropertyInfo &property) const override { - if (property.name == "gain") { - property.usage = PROPERTY_USAGE_NONE; + void _validate_property(PropertyInfo &p_property) const { + if (p_property.name == "gain") { + p_property.usage = PROPERTY_USAGE_NONE; } } @@ -111,9 +111,9 @@ public: class AudioEffectHighPassFilter : public AudioEffectFilter { GDCLASS(AudioEffectHighPassFilter, AudioEffectFilter); - void _validate_property(PropertyInfo &property) const override { - if (property.name == "gain") { - property.usage = PROPERTY_USAGE_NONE; + void _validate_property(PropertyInfo &p_property) const { + if (p_property.name == "gain") { + p_property.usage = PROPERTY_USAGE_NONE; } } @@ -124,9 +124,9 @@ public: class AudioEffectBandPassFilter : public AudioEffectFilter { GDCLASS(AudioEffectBandPassFilter, AudioEffectFilter); - void _validate_property(PropertyInfo &property) const override { - if (property.name == "gain") { - property.usage = PROPERTY_USAGE_NONE; + void _validate_property(PropertyInfo &p_property) const { + if (p_property.name == "gain") { + p_property.usage = PROPERTY_USAGE_NONE; } } |