aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore/Source
diff options
context:
space:
mode:
authorGravatar Gil <mcg@google.com>2018-05-22 16:39:45 -0700
committerGravatar GitHub <noreply@github.com>2018-05-22 16:39:45 -0700
commitfb0ba40c00b9d777ccb0bd70e2ebaee1386af4e6 (patch)
treead31b7b6dca889a400bc79f56ba85adc36d796c0 /Firestore/Source
parentd439bbccd4b90583a89d209d2cc81308aabca8ac (diff)
Remove extraneous braces (#1315)
Diffstat (limited to 'Firestore/Source')
-rw-r--r--Firestore/Source/API/FIRFieldPath.mm2
-rw-r--r--Firestore/Source/API/FSTUserDataConverter.mm12
-rw-r--r--Firestore/Source/Local/FSTLevelDBKey.mm2
3 files changed, 8 insertions, 8 deletions
diff --git a/Firestore/Source/API/FIRFieldPath.mm b/Firestore/Source/API/FIRFieldPath.mm
index 4fd0022..68f3de1 100644
--- a/Firestore/Source/API/FIRFieldPath.mm
+++ b/Firestore/Source/API/FIRFieldPath.mm
@@ -47,7 +47,7 @@ NS_ASSUME_NONNULL_BEGIN
FSTThrowInvalidArgument(@"Invalid field path. Provided names must not be empty.");
}
- std::vector<std::string> field_names{};
+ std::vector<std::string> field_names;
field_names.reserve(fieldNames.count);
for (int i = 0; i < fieldNames.count; ++i) {
if (fieldNames[i].length == 0) {
diff --git a/Firestore/Source/API/FSTUserDataConverter.mm b/Firestore/Source/API/FSTUserDataConverter.mm
index 6d01c75..3484539 100644
--- a/Firestore/Source/API/FSTUserDataConverter.mm
+++ b/Firestore/Source/API/FSTUserDataConverter.mm
@@ -268,7 +268,7 @@ typedef NS_ENUM(NSInteger, FSTUserDataSource) {
}
- (instancetype)contextForField:(NSString *)fieldName {
- std::unique_ptr<FieldPath> path{};
+ std::unique_ptr<FieldPath> path;
if (_path) {
path = absl::make_unique<FieldPath>(_path->Append(util::MakeString(fieldName)));
}
@@ -282,7 +282,7 @@ typedef NS_ENUM(NSInteger, FSTUserDataSource) {
}
- (instancetype)contextForFieldPath:(const FieldPath &)fieldPath {
- std::unique_ptr<FieldPath> path{};
+ std::unique_ptr<FieldPath> path;
if (_path) {
path = absl::make_unique<FieldPath>(_path->Append(fieldPath));
}
@@ -428,9 +428,9 @@ typedef NS_ENUM(NSInteger, FSTUserDataSource) {
std::vector<FieldTransform> convertedFieldTransform;
if (fieldMask) {
- __block std::vector<FieldPath> fieldMaskPaths{};
+ __block std::vector<FieldPath> fieldMaskPaths;
[fieldMask enumerateObjectsUsingBlock:^(id fieldPath, NSUInteger idx, BOOL *stop) {
- FieldPath path{};
+ FieldPath path;
if ([fieldPath isKindOfClass:[NSString class]]) {
path = [FIRFieldPath pathWithDotSeparatedString:fieldPath].internalValue;
@@ -490,14 +490,14 @@ typedef NS_ENUM(NSInteger, FSTUserDataSource) {
NSDictionary *dict = input;
- __block std::vector<FieldPath> fieldMaskPaths{};
+ __block std::vector<FieldPath> fieldMaskPaths;
__block FSTObjectValue *updateData = [FSTObjectValue objectValue];
FSTParseContext *context =
[FSTParseContext contextWithSource:FSTUserDataSourceUpdate
path:absl::make_unique<FieldPath>(FieldPath::EmptyPath())];
[dict enumerateKeysAndObjectsUsingBlock:^(id key, id value, BOOL *stop) {
- FieldPath path{};
+ FieldPath path;
if ([key isKindOfClass:[NSString class]]) {
path = [FIRFieldPath pathWithDotSeparatedString:key].internalValue;
diff --git a/Firestore/Source/Local/FSTLevelDBKey.mm b/Firestore/Source/Local/FSTLevelDBKey.mm
index e23f5b7..1fe0396 100644
--- a/Firestore/Source/Local/FSTLevelDBKey.mm
+++ b/Firestore/Source/Local/FSTLevelDBKey.mm
@@ -280,7 +280,7 @@ BOOL ReadDocumentKey(Slice *contents, FSTDocumentKey *__strong *result) {
Slice completeSegments = *contents;
std::string segment;
- std::vector<std::string> path_segments{};
+ std::vector<std::string> path_segments;
for (;;) {
// Advance a temporary slice to avoid advancing contents into the next key component which may
// not be a path segment.