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

Make SurfaceManager const correct #48485

Closed

Conversation

christophpurrer
Copy link
Contributor

Summary:
[Changelog] [Internal] - Make SurfaceManager const correct

This marks methods which don't modify member props as const and others as non const.

The current API signature is misleading as const methods do alter mutable members

Differential Revision: D67820439

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner labels Jan 4, 2025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D67820439

christophpurrer added a commit to christophpurrer/react-native-macos that referenced this pull request Jan 4, 2025
Summary:

[Changelog] [Internal] - Make SurfaceManager const correct

This marks methods which don't modify member props as `const` and others as non `const`.

The current API signature is misleading as `const` methods do alter `mutable` members

Differential Revision: D67820439
christophpurrer added a commit to christophpurrer/react-native-macos that referenced this pull request Jan 4, 2025
Summary:

[Changelog] [Internal] - Make SurfaceManager const correct

This marks methods which don't modify member props as `const` and others as non `const`.

The current API signature is misleading as `const` methods do alter `mutable` members

Differential Revision: D67820439
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D67820439

1 similar comment
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D67820439

christophpurrer added a commit to christophpurrer/react-native-macos that referenced this pull request Jan 4, 2025
Summary:

[Changelog] [Internal] - Make SurfaceManager const correct

This marks methods which don't modify member props as `const` and others as non `const`.

The current API signature is misleading as `const` methods do alter `mutable` members

Differential Revision: D67820439
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D67820439

christophpurrer added a commit to christophpurrer/react-native-macos that referenced this pull request Jan 4, 2025
Summary:

[Changelog] [Internal] - Make SurfaceManager const correct

This marks methods which don't modify member props as `const` and others as non `const`.

The current API signature is misleading as `const` methods do alter `mutable` members

Differential Revision: D67820439
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D67820439

@shergin
Copy link
Contributor

shergin commented Jan 5, 2025

@christophpurrer I don't know which problem you are solving, but I suspect this change is not correct.
I believe, what you are calling misleading here is a just standard C++ approach for designating thread-safe methods.
I think there is a classic youtube talk by Herb Sutter about that where he's describing that in details.

christophpurrer added a commit to christophpurrer/react-native-macos that referenced this pull request Jan 6, 2025
Summary:

[Changelog] [Internal] - Make SurfaceManager const correct

This marks methods which don't modify member props as `const` and others as non `const`.

The current API signature is misleading as `const` methods do alter `mutable` members

Reviewed By: rshest

Differential Revision: D67820439
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D67820439

christophpurrer added a commit to christophpurrer/react-native-macos that referenced this pull request Jan 6, 2025
Summary:

[Changelog] [Internal] - Make SurfaceManager const correct

This marks methods which don't modify member props as `const` and others as non `const`.

The current API signature is misleading as `const` methods do alter `mutable` members

Reviewed By: rshest

Differential Revision: D67820439
Summary:

[Changelog] [Internal] - Make SurfaceManager const correct

This marks methods which don't modify member props as `const` and others as non `const`.

The current API signature is misleading as `const` methods do alter `mutable` members

Reviewed By: rshest

Differential Revision: D67820439
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D67820439

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D67820439

christophpurrer added a commit to christophpurrer/react-native-macos that referenced this pull request Jan 6, 2025
Summary:

[Changelog] [Internal] - Make SurfaceManager const correct

This marks methods which don't modify member props as `const` and others as non `const`.

The current API signature is misleading as `const` methods do alter `mutable` members

Reviewed By: rshest

Differential Revision: D67820439
christophpurrer added a commit to christophpurrer/react-native-macos that referenced this pull request Jan 6, 2025
Summary:

[Changelog] [Internal] - Make SurfaceManager const correct

This marks methods which don't modify member props as `const` and others as non `const`.

The current API signature is misleading as `const` methods do alter `mutable` members

Reviewed By: rshest

Differential Revision: D67820439
@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Jan 6, 2025
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in c855251.

@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @christophpurrer in c855251

When will my fix make it into a release? | How to file a pick request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants