diff options
author | A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> | 2024-07-26 11:52:26 +0200 |
---|---|---|
committer | A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> | 2024-08-31 15:01:09 +0200 |
commit | 194bdde94787227e8f53a4e3273c192ab70b03ac (patch) | |
tree | c5e9d87fae1c8eb2af98ab34d687bd8c5a4a18d5 /scene/resources/shader.cpp | |
parent | 61598c5c88d95b96811d386cb20d714c35f4c6d7 (diff) | |
download | redot-engine-194bdde94787227e8f53a4e3273c192ab70b03ac.tar.gz |
Cleanup of raw `nullptr` checks with `Ref`
Using `is_valid/null` over checks with `nullptr` or `ERR_FAIL_NULL` etc.
Diffstat (limited to 'scene/resources/shader.cpp')
-rw-r--r-- | scene/resources/shader.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/resources/shader.cpp b/scene/resources/shader.cpp index f343229cd8..46d38146a6 100644 --- a/scene/resources/shader.cpp +++ b/scene/resources/shader.cpp @@ -158,7 +158,7 @@ void Shader::get_shader_uniform_list(List<PropertyInfo> *p_params, bool p_get_gr #ifdef MODULE_REGEX_ENABLED const RegEx pattern("/\\*\\*\\s([^*]|[\\r\\n]|(\\*+([^*/]|[\\r\\n])))*\\*+/\\s*uniform\\s+\\w+\\s+" + pi.name + "(?=[\\s:;=])"); Ref<RegExMatch> pattern_ref = pattern.search(code); - if (pattern_ref != nullptr) { + if (pattern_ref.is_valid()) { RegExMatch *match = pattern_ref.ptr(); const RegEx pattern_tip("\\/\\*\\*([\\s\\S]*?)\\*/"); Ref<RegExMatch> pattern_tip_ref = pattern_tip.search(match->get_string(0)); |