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

Remove ON_VALUE usage because hasAuthCallback is always set #252

Merged

Conversation

ben-xD
Copy link
Contributor

@ben-xD ben-xD commented Nov 23, 2021

Xcode was warning about an unused returned value when we used:

[co initWithClientOptions: o hasAuthCallback: value];

I just call the initializer directly and return the result.

Also, there was no need for the use of ON_VALUE macro. dictionary[TxClientOptions_hasAuthCallback] is always false or true, never nil or NSNull.

When you see

  _writeToJson(
        jsonMap, TxClientOptions.hasAuthCallback, v.authCallback != null);

This is saying, we only set the key/value pair to jsonMap if v.authCallback != null is non null. Well, != never returns null.

@ben-xD ben-xD added the enhancement New feature or improved functionality. label Nov 23, 2021
@ben-xD ben-xD self-assigned this Nov 23, 2021
@github-actions github-actions bot temporarily deployed to staging/pull/252/dartdoc November 23, 2021 15:20 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/252/dartdoc November 23, 2021 15:53 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/252/dartdoc November 23, 2021 16:07 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/252/dartdoc November 23, 2021 21:36 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/252/dartdoc November 24, 2021 08:12 Inactive
@QuintinWillison QuintinWillison marked this pull request as draft November 26, 2021 09:02
@ben-xD ben-xD changed the base branch from bug/ios/crashing-when-clientid-is-not-set to enhancement/package-descriptions November 26, 2021 22:05
@ben-xD ben-xD force-pushed the enhancement/ios/linter-warning branch from f0ec74f to 07df1fa Compare November 26, 2021 22:08
@ben-xD
Copy link
Contributor Author

ben-xD commented Nov 26, 2021

@lukasz-szyszkowski, I reverted the rename of variables (e.g. o to clientOptions) and have put this in a separate PR #262.

@ben-xD ben-xD merged commit 2ea439e into enhancement/package-descriptions Dec 8, 2021
@ben-xD ben-xD deleted the enhancement/ios/linter-warning branch December 8, 2021 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improved functionality.
Development

Successfully merging this pull request may close these issues.

2 participants