Merge pull request #93517 from Repiteo/core/nodiscard-strings
Core: Add `[[nodiscard]]` to string-like classes/structs
This commit is contained in:
@ -1563,7 +1563,8 @@ Error ShaderCompiler::compile(RS::ShaderMode p_mode, const String &p_code, Ident
|
||||
|
||||
shader = parser.get_shader();
|
||||
function = nullptr;
|
||||
_dump_node_code(shader, 1, r_gen_code, *p_actions, actions, false);
|
||||
// Return value only relevant within nested calls.
|
||||
_ALLOW_DISCARD_ _dump_node_code(shader, 1, r_gen_code, *p_actions, actions, false);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
@ -552,7 +552,8 @@ void ShaderPreprocessor::process_else(Tokenizer *p_tokenizer) {
|
||||
if (skip) {
|
||||
Vector<String> ends;
|
||||
ends.push_back("endif");
|
||||
next_directive(p_tokenizer, ends);
|
||||
// Legacy return value.
|
||||
_ALLOW_DISCARD_ next_directive(p_tokenizer, ends);
|
||||
}
|
||||
}
|
||||
|
||||
@ -847,7 +848,8 @@ void ShaderPreprocessor::start_branch_condition(Tokenizer *p_tokenizer, bool p_s
|
||||
ends.push_back("elif");
|
||||
ends.push_back("else");
|
||||
ends.push_back("endif");
|
||||
next_directive(p_tokenizer, ends);
|
||||
// Legacy return value.
|
||||
_ALLOW_DISCARD_ next_directive(p_tokenizer, ends);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user