Skip to content

Commit 2937104

Browse files
authored
Safe cast for number of aggregations to fix compilation warning. (#11342)
* Safe cast for number of aggregations to fix compilation warning. Fixes #11332. * Add changelog entry.
1 parent 04ce260 commit 2937104

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

Firestore/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Unreleased
2+
- [fixed] Fixed a compilation warning related to integer casting. (#11332)
3+
14
# 10.9.0
25
- [feature] Add new cache config API to customize SDK cache settings.
36
- [feature] Add LRU garbage collector as an option to memory cache.

Firestore/core/src/remote/remote_objc_bridge.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,8 +298,8 @@ DatastoreSerializer::EncodeAggregateQueryRequest(
298298
uniqueAggregates.insert(std::move(pair));
299299
}
300300

301-
auto count = uniqueAggregates.size();
302-
size_t aggregationNum = 0;
301+
pb_size_t count = static_cast<pb_size_t>(uniqueAggregates.size());
302+
pb_size_t aggregationNum = 0;
303303
result->query_type.structured_aggregation_query.aggregations_count = count;
304304
result->query_type.structured_aggregation_query.aggregations =
305305
MakeArray<_google_firestore_v1_StructuredAggregationQuery_Aggregation>(

0 commit comments

Comments
 (0)