Skip to content

Commit 2acc073

Browse files
authored
Remove vector_of_ptr (#3458)
1 parent 0630c71 commit 2acc073

File tree

8 files changed

+7
-216
lines changed

8 files changed

+7
-216
lines changed

Firestore/Example/Firestore.xcodeproj/project.pbxproj

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@
121121
198F193BD9484E49375A7BE7 /* FSTHelpers.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5492E03A2021401F00B64F25 /* FSTHelpers.mm */; };
122122
199B778D5820495797E0BE02 /* filesystem_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = F51859B394D01C0C507282F1 /* filesystem_test.cc */; };
123123
1A1927621A8593B0A69AA2F3 /* FSTLevelDBMigrationsTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5492E0862021552A00B64F25 /* FSTLevelDBMigrationsTests.mm */; };
124-
1AA1D22D05F353BAF0375699 /* vector_of_ptr_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 540C379C22C1741000E70F15 /* vector_of_ptr_test.cc */; };
125124
1B6E74BA33B010D76DB1E2F9 /* FIRGeoPointTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5492E048202154AA00B64F25 /* FIRGeoPointTests.mm */; };
126125
1C19D796DB6715368407387A /* annotations.pb.cc in Sources */ = {isa = PBXBuildFile; fileRef = 618BBE9520B89AAC00B5BCE7 /* annotations.pb.cc */; };
127126
1C4D8915AE94323AD1024D74 /* token_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = ABC1D7DF2023A3EF00BA84F0 /* token_test.cc */; };
@@ -342,9 +341,6 @@
342341
53AB47E44D897C81A94031F6 /* write.pb.cc in Sources */ = {isa = PBXBuildFile; fileRef = 544129D921C2DDC800EFB9CC /* write.pb.cc */; };
343342
53F449F69DF8A3ABC711FD59 /* secure_random_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 54740A531FC913E500713A1A /* secure_random_test.cc */; };
344343
54080260D85A6F583E61DA1D /* FSTLocalSerializerTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5492E08A2021552A00B64F25 /* FSTLocalSerializerTests.mm */; };
345-
540C379D22C1741000E70F15 /* vector_of_ptr_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 540C379C22C1741000E70F15 /* vector_of_ptr_test.cc */; };
346-
540C379E22C1741000E70F15 /* vector_of_ptr_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 540C379C22C1741000E70F15 /* vector_of_ptr_test.cc */; };
347-
540C379F22C1741000E70F15 /* vector_of_ptr_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 540C379C22C1741000E70F15 /* vector_of_ptr_test.cc */; };
348344
54131E9720ADE679001DF3FF /* string_format_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 54131E9620ADE678001DF3FF /* string_format_test.cc */; };
349345
544129DA21C2DDC800EFB9CC /* common.pb.cc in Sources */ = {isa = PBXBuildFile; fileRef = 544129D221C2DDC800EFB9CC /* common.pb.cc */; };
350346
544129DB21C2DDC800EFB9CC /* firestore.pb.cc in Sources */ = {isa = PBXBuildFile; fileRef = 544129D421C2DDC800EFB9CC /* firestore.pb.cc */; };
@@ -568,7 +564,6 @@
568564
61D35E0DE04E70D3BC243A65 /* FIRGeoPointTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5492E048202154AA00B64F25 /* FIRGeoPointTests.mm */; };
569565
61F72C5620BC48FD001A68CB /* serializer_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 61F72C5520BC48FD001A68CB /* serializer_test.cc */; };
570566
623AA12C3481646B0715006D /* string_apple_test.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0EE5300F8233D14025EF0456 /* string_apple_test.mm */; };
571-
62407842CABFB9B1C181DDF0 /* vector_of_ptr_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 540C379C22C1741000E70F15 /* vector_of_ptr_test.cc */; };
572567
627253FDEC6BB5549FE77F4E /* tree_sorted_map_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 549CCA4D20A36DBB00BCEB75 /* tree_sorted_map_test.cc */; };
573568
62DA31B79FE97A90EEF28B0B /* delayed_constructor_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = D0A6E9136804A41CEC9D55D4 /* delayed_constructor_test.cc */; };
574569
62F86BBE7DDA5B295B57C8DA /* string_apple_test.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0EE5300F8233D14025EF0456 /* string_apple_test.mm */; };
@@ -670,7 +665,6 @@
670665
7BCF050BA04537B0E7D44730 /* exponential_backoff_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = B6D1B68420E2AB1A00B35856 /* exponential_backoff_test.cc */; };
671666
7C5E017689012489AAB7718D /* CodableGeoPointTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5495EB022040E90200EBA509 /* CodableGeoPointTests.swift */; };
672667
7C7BA1DB0B66EB899A928283 /* hashing_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 54511E8D209805F8005BD28F /* hashing_test.cc */; };
673-
7C989EFBB5422ADBE5F274FE /* vector_of_ptr_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 540C379C22C1741000E70F15 /* vector_of_ptr_test.cc */; };
674668
7D3BAA30A9055B43F02E5FBC /* field_transform_test.mm in Sources */ = {isa = PBXBuildFile; fileRef = 54A0352320A3AEC3003E0143 /* field_transform_test.mm */; };
675669
7DBE7DB90CF83B589A94980F /* reference_set_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 132E32997D781B896672D30A /* reference_set_test.cc */; };
676670
7DD67E9621C52B790E844B16 /* FIRDatabaseTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5492E06C202154D500B64F25 /* FIRDatabaseTests.mm */; };
@@ -1266,7 +1260,6 @@
12661260
444B7AB3F5A2929070CB1363 /* hard_assert_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = hard_assert_test.cc; sourceTree = "<group>"; };
12671261
4C73C0CC6F62A90D8573F383 /* string_apple_benchmark.mm */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.objcpp; path = string_apple_benchmark.mm; sourceTree = "<group>"; };
12681262
5342CDDB137B4E93E2E85CCA /* byte_string_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; name = byte_string_test.cc; path = nanopb/byte_string_test.cc; sourceTree = "<group>"; };
1269-
540C379C22C1741000E70F15 /* vector_of_ptr_test.cc */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = vector_of_ptr_test.cc; sourceTree = "<group>"; };
12701263
54131E9620ADE678001DF3FF /* string_format_test.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = string_format_test.cc; sourceTree = "<group>"; };
12711264
544129D021C2DDC800EFB9CC /* query.pb.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = query.pb.h; sourceTree = "<group>"; };
12721265
544129D121C2DDC800EFB9CC /* common.pb.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = common.pb.h; sourceTree = "<group>"; };
@@ -1808,7 +1801,6 @@
18081801
79507DF8378D3C42F5B36268 /* string_win_test.cc */,
18091802
B68B1E002213A764008977EF /* to_string_apple_test.mm */,
18101803
B696858D2214B53900271095 /* to_string_test.cc */,
1811-
540C379C22C1741000E70F15 /* vector_of_ptr_test.cc */,
18121804
);
18131805
path = util;
18141806
sourceTree = "<group>";
@@ -3541,7 +3533,6 @@
35413533
8DA258092DD856D829D973B5 /* transform_operations_test.mm in Sources */,
35423534
5F19F66D8B01BA2B97579017 /* tree_sorted_map_test.cc in Sources */,
35433535
16F52ECC6FA8A0587CD779EB /* user_test.cc in Sources */,
3544-
540C379E22C1741000E70F15 /* vector_of_ptr_test.cc in Sources */,
35453536
E3C0E5F834A82EEE9F8C4519 /* watch_change_test.mm in Sources */,
35463537
53AB47E44D897C81A94031F6 /* write.pb.cc in Sources */,
35473538
59E6941008253D4B0F77C2BA /* writer_test.cc in Sources */,
@@ -3718,7 +3709,6 @@
37183709
5C7FAF228D0F52CFFE9E41B5 /* transform_operations_test.mm in Sources */,
37193710
627253FDEC6BB5549FE77F4E /* tree_sorted_map_test.cc in Sources */,
37203711
596C782EFB68131380F8EEF8 /* user_test.cc in Sources */,
3721-
540C379F22C1741000E70F15 /* vector_of_ptr_test.cc in Sources */,
37223712
178FE1E277C63B3E7120BE56 /* watch_change_test.mm in Sources */,
37233713
A5AB1815C45FFC762981E481 /* write.pb.cc in Sources */,
37243714
A21819C437C3C80450D7EEEE /* writer_test.cc in Sources */,
@@ -3906,7 +3896,6 @@
39063896
5F9B5702D6356DBC9E1E7D2C /* transform_operations_test.mm in Sources */,
39073897
54B91B921DA757C64CC67C90 /* tree_sorted_map_test.cc in Sources */,
39083898
8D5A9E6E43B6F47431841FE2 /* user_test.cc in Sources */,
3909-
7C989EFBB5422ADBE5F274FE /* vector_of_ptr_test.cc in Sources */,
39103899
66893D9942F147772EA6CDA4 /* watch_change_test.mm in Sources */,
39113900
FCF8E7F5268F6842C07B69CF /* write.pb.cc in Sources */,
39123901
B0D10C3451EDFB016A6EAF03 /* writer_test.cc in Sources */,
@@ -4094,7 +4083,6 @@
40944083
2153BB93FDAD158FB61E068A /* transform_operations_test.mm in Sources */,
40954084
3D22F56C0DE7C7256C75DC06 /* tree_sorted_map_test.cc in Sources */,
40964085
918E3D35942CE493690C45CE /* user_test.cc in Sources */,
4097-
1AA1D22D05F353BAF0375699 /* vector_of_ptr_test.cc in Sources */,
40984086
93FF6F51D0FEFE3A235FA8F3 /* watch_change_test.mm in Sources */,
40994087
B592DB7DB492B1C1D5E67D01 /* write.pb.cc in Sources */,
41004088
E51957EDECF741E1D3C3968A /* writer_test.cc in Sources */,
@@ -4293,7 +4281,6 @@
42934281
54A0352720A3AED0003E0143 /* transform_operations_test.mm in Sources */,
42944282
549CCA5120A36DBC00BCEB75 /* tree_sorted_map_test.cc in Sources */,
42954283
ABC1D7DE2023A05300BA84F0 /* user_test.cc in Sources */,
4296-
540C379D22C1741000E70F15 /* vector_of_ptr_test.cc in Sources */,
42974284
B68FC0E521F6848700A7055C /* watch_change_test.mm in Sources */,
42984285
544129DE21C2DDC800EFB9CC /* write.pb.cc in Sources */,
42994286
3BA4EEA6153B3833F86B8104 /* writer_test.cc in Sources */,
@@ -4500,7 +4487,6 @@
45004487
26C8485FF6BDF35CCDDAC79E /* transform_operations_test.mm in Sources */,
45014488
5DA343D28AE05B0B2FE9FFB3 /* tree_sorted_map_test.cc in Sources */,
45024489
D43F7601F3F3DE3125346D42 /* user_test.cc in Sources */,
4503-
62407842CABFB9B1C181DDF0 /* vector_of_ptr_test.cc in Sources */,
45044490
A236FB5BF7ABD267220DEDB3 /* watch_change_test.mm in Sources */,
45054491
E435450184AEB51EE8435F66 /* write.pb.cc in Sources */,
45064492
AFB0ACCF130713DF6495E110 /* writer_test.cc in Sources */,

Firestore/core/src/firebase/firestore/api/query_core.mm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#include "Firestore/core/src/firebase/firestore/core/field_filter.h"
2828
#include "Firestore/core/src/firebase/firestore/core/filter.h"
2929
#include "Firestore/core/src/firebase/firestore/model/field_value.h"
30+
#include "absl/algorithm/container.h"
3031

3132
NS_ASSUME_NONNULL_BEGIN
3233

Firestore/core/src/firebase/firestore/core/query.cc

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include "Firestore/core/src/firebase/firestore/model/resource_path.h"
2525
#include "Firestore/core/src/firebase/firestore/util/equality.h"
2626
#include "Firestore/core/src/firebase/firestore/util/hard_assert.h"
27+
#include "absl/algorithm/container.h"
2728

2829
namespace firebase {
2930
namespace firestore {
@@ -39,9 +40,8 @@ using model::FieldPath;
3940
using model::ResourcePath;
4041

4142
template <typename T>
42-
util::vector_of_ptr<T> AppendingTo(const util::vector_of_ptr<T>& vector,
43-
T&& value) {
44-
util::vector_of_ptr<T> updated = vector;
43+
std::vector<T> AppendingTo(const std::vector<T>& vector, T&& value) {
44+
std::vector<T> updated = vector;
4545
updated.push_back(std::forward<T>(value));
4646
return updated;
4747
}
@@ -142,7 +142,8 @@ bool Query::MatchesBounds(const Document&) const {
142142
bool operator==(const Query& lhs, const Query& rhs) {
143143
return lhs.path() == rhs.path() &&
144144
util::Equals(lhs.collection_group(), rhs.collection_group()) &&
145-
lhs.filters() == rhs.filters();
145+
absl::c_equal(lhs.filters(), rhs.filters(),
146+
util::Equals<std::shared_ptr<const Filter>>);
146147
}
147148

148149
} // namespace core

Firestore/core/src/firebase/firestore/core/query.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
#include "Firestore/core/src/firebase/firestore/core/filter.h"
2727
#include "Firestore/core/src/firebase/firestore/model/document.h"
2828
#include "Firestore/core/src/firebase/firestore/model/resource_path.h"
29-
#include "Firestore/core/src/firebase/firestore/util/vector_of_ptr.h"
3029

3130
namespace firebase {
3231
namespace firestore {
@@ -38,7 +37,7 @@ namespace core {
3837
*/
3938
class Query {
4039
public:
41-
using FilterList = util::vector_of_ptr<std::shared_ptr<Filter>>;
40+
using FilterList = std::vector<std::shared_ptr<Filter>>;
4241

4342
static constexpr int32_t kNoLimit = std::numeric_limits<int32_t>::max();
4443

Firestore/core/src/firebase/firestore/util/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,6 @@ cc_library(
263263
string_util.h
264264
to_string.h
265265
type_traits.h
266-
vector_of_ptr.h
267266
warnings.h
268267
DEPENDS
269268
absl_base

Firestore/core/src/firebase/firestore/util/vector_of_ptr.h

Lines changed: 0 additions & 101 deletions
This file was deleted.

Firestore/core/test/firebase/firestore/util/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,6 @@ cc_test(
163163
string_format_test.cc
164164
string_util_test.cc
165165
string_win_test.cc
166-
vector_of_ptr_test.cc
167166
DEPENDS
168167
absl_base
169168
absl_strings

Firestore/core/test/firebase/firestore/util/vector_of_ptr_test.cc

Lines changed: 0 additions & 93 deletions
This file was deleted.

0 commit comments

Comments
 (0)