Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/tvm/ffi/extra/structural_equal.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class StructuralEqual {
* \return True if the two Any values are structurally equal, false otherwise.
*/
TVM_FFI_INLINE bool operator()(const Any& lhs, const Any& rhs) const {
return Equal(lhs, rhs, false, true);
return Equal(lhs, rhs, false, false);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Passing multiple consecutive boolean literals (often referred to as the "Boolean Trap") reduces code readability and increases the risk of parameter mismatch errors. Since both map_free_vars and skip_tensor_content default to false in the signature of Equal, we can simplify this call to Equal(lhs, rhs) to make the code cleaner and more maintainable.

    return Equal(lhs, rhs);

}
};

Expand Down