Merge pull request #29283 from qarmin/fix_some_always_same_values

Remove always true/false values
This commit is contained in:
Rémi Verschelde 2019-06-20 21:10:10 +02:00 committed by GitHub
commit 5c66771e3e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
32 changed files with 128 additions and 184 deletions

View file

@ -1692,7 +1692,7 @@ Variant VisualScriptInstance::_call_internal(const StringName &p_method, void *p
if ((ret == output || ret & VisualScriptNodeInstance::STEP_FLAG_PUSH_STACK_BIT) && node->sequence_output_count) {
//if no exit bit was set, and has sequence outputs, guess next node
if (output < 0 || output >= node->sequence_output_count) {
if (output >= node->sequence_output_count) {
r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
error_str = RTR("Node returned an invalid sequence output: ") + itos(output);
error = true;

View file

@ -188,7 +188,6 @@ void VisualScriptPropertySelector::_update_search() {
}
}
}
bool script_methods = false;
{
if (type != Variant::NIL) {
Variant v;
@ -211,7 +210,7 @@ void VisualScriptPropertySelector::_update_search() {
for (List<MethodInfo>::Element *M = methods.front(); M; M = M->next()) {
String name = M->get().name.get_slice(":", 0);
if (!script_methods && name.begins_with("_") && !(M->get().flags & METHOD_FLAG_VIRTUAL))
if (name.begins_with("_") && !(M->get().flags & METHOD_FLAG_VIRTUAL))
continue;
if (virtuals_only && !(M->get().flags & METHOD_FLAG_VIRTUAL))