File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -340,7 +340,9 @@ void HandleFinalStatus(const Status &status) {
340340
341341 int max_attempts = [FIRTransactionOptions defaultMaxAttempts ];
342342 if (options) {
343- max_attempts = options.maxAttempts ;
343+ // Note: The cast of `maxAttempts` from `NSInteger` to `int` is safe (i.e. lossless) because
344+ // `FIRTransactionOptions` does not allow values greater than `INT32_MAX` to be set.
345+ max_attempts = static_cast <int >(options.maxAttempts );
344346 }
345347
346348 _firestore->RunTransaction (std::move(internalUpdateBlock), std::move(objcTranslator),
Original file line number Diff line number Diff line change @@ -33,8 +33,8 @@ namespace util {
3333 *
3434 * The method runs in O(n) where n is the size of the two lists.
3535 *
36- * @param before - The elements that exist in the original set.
37- * @param after - The elements to diff against the original set.
36+ * @param existing - The elements that exist in the original set.
37+ * @param new_entries - The elements to diff against the original set.
3838 * @param comparator - The comparator for the elements in before and after.
3939 * @param on_add - A function to invoke for every element that is part of `
4040 * after` but not `before`.
You can’t perform that action at this time.
0 commit comments