Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Node] Utility methods for ObjectPathPair handling #14498

Merged
merged 4 commits into from
Apr 6, 2023

Commits on Apr 4, 2023

  1. [Node] Utility methods for ObjectPathPair handling

    This commit adds a templated overload to `SEqualReducer::operator()`
    that accepts a lambda function to update the path of the LHS and RHS
    of the comparison.
    
    ```c++
    // Usage prior to this utility function
    if (equal.IsPathTracingEnabled()) {
      const ObjectPathPair& self_paths = equal.GetCurrentObjectPaths();
      ObjectPathPair attr_paths = {self_paths->lhs_path->Attr("value"),
                                   self_paths->rhs_path->Attr("value")};
      if (!equal(this->value, other->value, attr_paths)) return false;
    } else {
      if (!equal(this->value, other->value)) return false;
    }
    
    // Usage after this utility function
    if (!equal(this->value, other->value,
               [](const auto& path) { return path->Attr("value"); })) {
      return false;
    }
    ```
    Lunderberg committed Apr 4, 2023
    Configuration menu
    Copy the full SHA
    49a0dae View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    83eaea0 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    fa0236c View commit details
    Browse the repository at this point in the history

Commits on Apr 5, 2023

  1. Configuration menu
    Copy the full SHA
    262ddba View commit details
    Browse the repository at this point in the history