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

[WIP] Replace Try methods that use out ref to pass the value to std optional #582

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

RyadaProductions
Copy link
Contributor

What kind of change does this PR introduce?
Code API change to move to a method signature that returns an optional instead of being invoked with a pass by ref parameter that is then set.

Is there an open issue that this resolves?
563.

What is the current behavior?
Method signature is generally something along the lines of:
bool TrySomething(T& outParam);

What is the new behavior (if this is a feature change)?
New method signature most of the time is now:
std::optional<T&> TrySomething()

Does this PR introduce a breaking change?
Yes this breaks the API in multiple spots but generally not for the end user yet as it's mostly isolated in engine code.

@RyadaProductions RyadaProductions changed the title Replace Try methods that use out ref to pass the value to std optional [WIP] Replace Try methods that use out ref to pass the value to std optional Jun 29, 2023
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.

1 participant