diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-03-14 21:15:12 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-14 21:15:12 +0100 |
commit | eedb3cea539fd3a8ad82ec1e377ba3d15c5f8ae0 (patch) | |
tree | 8e0e02b80601087590683e414845948f89c98b35 /editor/doc_tools.cpp | |
parent | 95b6c6cf9a5a21b65ac7cb221b9d997fbf66184e (diff) | |
parent | 32f2c473565027a8bd33ccc1147d5a0249029db0 (diff) |
Merge pull request #59149 from Chaosus/fix_generating_null_comparing_op
Remove generating of null comparison operators from documentation
Diffstat (limited to 'editor/doc_tools.cpp')
-rw-r--r-- | editor/doc_tools.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/editor/doc_tools.cpp b/editor/doc_tools.cpp index a9d18e9dcc..adad8fdba8 100644 --- a/editor/doc_tools.cpp +++ b/editor/doc_tools.cpp @@ -685,6 +685,11 @@ void DocTools::generate(bool p_basic_types) { for (int j = 0; j < Variant::OP_AND; j++) { // Showing above 'and' is pretty confusing and there are a lot of variations. for (int k = 0; k < Variant::VARIANT_MAX; k++) { + // Prevent generating for comparison with null. + if (Variant::Type(k) == Variant::NIL && (Variant::Operator(j) == Variant::OP_EQUAL || Variant::Operator(j) == Variant::OP_NOT_EQUAL)) { + continue; + } + Variant::Type rt = Variant::get_operator_return_type(Variant::Operator(j), Variant::Type(i), Variant::Type(k)); if (rt != Variant::NIL) { // Has operator. // Skip String % operator as it's registered separately for each Variant arg type, |