Skip to content

C++ migration: port FSTTargetChange #2318

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

Merged
merged 71 commits into from
Jan 29, 2019
Merged

Conversation

var-const
Copy link
Contributor

No description provided.

@zxu123 zxu123 removed their assignment Jan 28, 2019
if (targetChange) {
for (const DocumentKey &key : targetChange.addedDocuments) {
- (void)applyTargetChange:(const absl::optional<TargetChange> &)maybeTargetChange {
if (maybeTargetChange.has_value()) {
Copy link
Member

Choose a reason for hiding this comment

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

This is fine (and is exactly as previous). You could reverse the if statement to eliminate a level of indentation, i.e.:

if (!...) return;
...

Very optional.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I would also prefer an early return, but other platforms follow this pattern as well. I'd rather leave as is for consistency.

modifiedDocuments:modified
removedDocuments:removed];
TargetChange FSTTestTargetChangeMarkCurrent() {
return {[NSData data], true, DocumentKeySet{}, DocumentKeySet{}, DocumentKeySet{}};
Copy link
Member

Choose a reason for hiding this comment

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

Consider adding named parameters for the bool and DocKeySet params. Also immediately below. Optional.

(Possibly more useful for the one below. Here, I don't know which docKeySet is which, but it doesn't matter since they're all defaulted.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@rsgowman rsgowman assigned var-const and unassigned rsgowman Jan 29, 2019
@var-const var-const merged commit f08a8bc into master Jan 29, 2019
bstpierr added a commit that referenced this pull request Feb 8, 2019
* master: (27 commits)
  Pass FSTMutations using a vector (#2357)
  Update CI to use CocoaPods 1.6.0 (#2360)
  Add NS_ASSUME_NONNULL_NOTATION for game center sign in (#2359)
  C++ migration: make all methods of `FSTRemoteStore` delegate to C++ (#2337)
  C++ migration: port write stream-related part of `FSTRemoteStore` (#2335)
  Resolve hard dependency of GameKit (#2355)
  Update gRPC certificate bundles locations for Firebase 5.16 (#2353)
  Start pod lib lint CI for IAM (#2347)
  Update library name to `fire-fiam`. (#2352)
  Bump FirebaseAnalyticsInterop version  (#2315)
  Add IAM headless to CI (#2341)
  C++ migration: port watch stream-related part of `FSTRemoteStore` (#2331)
  Open source FIAM headless SDK (#2312)
  Port flaky test fix from web. (#2332)
  Make scripts/style.sh compatible with newer swiftformat versions (0.38) (#2334)
  C++ migration: port `FSTOnlineStateTracker` (#2325)
  Don't build fuzz tests target on Travis (#2330)
  Remove FSTMutationQueue (#2319)
  C++ migration: port `FSTRemoteEvent` (#2320)
  C++ migration: port `FSTTargetChange` (#2318)
  ...
@paulb777 paulb777 deleted the varconst/fst-target-change branch April 13, 2019 16:00
@firebase firebase locked and limited conversation to collaborators Oct 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants