From 1a24c9e14bf1f9578eda338344c12faf66fb0e65 Mon Sep 17 00:00:00 2001 From: Yuri Sizov Date: Fri, 12 Aug 2022 23:57:11 +0300 Subject: Make `_validate_property` a multilevel method --- scene/audio/audio_stream_player.cpp | 8 +++----- scene/audio/audio_stream_player.h | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'scene/audio') diff --git a/scene/audio/audio_stream_player.cpp b/scene/audio/audio_stream_player.cpp index 04debcab05..7c85b650bf 100644 --- a/scene/audio/audio_stream_player.cpp +++ b/scene/audio/audio_stream_player.cpp @@ -283,8 +283,8 @@ Vector AudioStreamPlayer::_get_volume_vector() { return volume_vector; } -void AudioStreamPlayer::_validate_property(PropertyInfo &property) const { - if (property.name == "bus") { +void AudioStreamPlayer::_validate_property(PropertyInfo &p_property) const { + if (p_property.name == "bus") { String options; for (int i = 0; i < AudioServer::get_singleton()->get_bus_count(); i++) { if (i > 0) { @@ -294,10 +294,8 @@ void AudioStreamPlayer::_validate_property(PropertyInfo &property) const { options += name; } - property.hint_string = options; + p_property.hint_string = options; } - - Node::_validate_property(property); } void AudioStreamPlayer::_bus_layout_changed() { diff --git a/scene/audio/audio_stream_player.h b/scene/audio/audio_stream_player.h index 67e616312a..45a6d7663e 100644 --- a/scene/audio/audio_stream_player.h +++ b/scene/audio/audio_stream_player.h @@ -72,7 +72,7 @@ private: Vector _get_volume_vector(); protected: - void _validate_property(PropertyInfo &property) const override; + void _validate_property(PropertyInfo &p_property) const; void _notification(int p_what); static void _bind_methods(); -- cgit v1.2.3