Skip to content

Conversation

@fhahn
Copy link
Contributor

@fhahn fhahn commented Sep 10, 2025

Most users of getNumUsers() only care about 3 case:

  • no users
  • one (unique) user
  • or more than one (unique) user

Instead of providing getNumUsers, provide helpers that accurately check for the 3 cases above, handling duplicates.

Most users of getNumUsers() only care about 3 case:
 * no users
 * one (unique) user
 * or more than one (unique) user

Instead of providing getNumUsers, provide helpers that accurately
check for the 3 cases above, handling duplicates.
Copy link
Contributor

@artagnon artagnon left a comment

Choose a reason for hiding this comment

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

Looks pretty straight-forward. Why is this a draft?


SmallVector<VPUser *, 1> Users;

unsigned getNumUsers() const { return Users.size(); }
Copy link
Contributor

Choose a reason for hiding this comment

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

Why keep this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants