From fb0ba40c00b9d777ccb0bd70e2ebaee1386af4e6 Mon Sep 17 00:00:00 2001 From: Gil Date: Tue, 22 May 2018 16:39:45 -0700 Subject: Remove extraneous braces (#1315) --- Firestore/Source/API/FIRFieldPath.mm | 2 +- Firestore/Source/API/FSTUserDataConverter.mm | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'Firestore/Source/API') 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 field_names{}; + std::vector 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 path{}; + std::unique_ptr path; if (_path) { path = absl::make_unique(_path->Append(util::MakeString(fieldName))); } @@ -282,7 +282,7 @@ typedef NS_ENUM(NSInteger, FSTUserDataSource) { } - (instancetype)contextForFieldPath:(const FieldPath &)fieldPath { - std::unique_ptr path{}; + std::unique_ptr path; if (_path) { path = absl::make_unique(_path->Append(fieldPath)); } @@ -428,9 +428,9 @@ typedef NS_ENUM(NSInteger, FSTUserDataSource) { std::vector convertedFieldTransform; if (fieldMask) { - __block std::vector fieldMaskPaths{}; + __block std::vector 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 fieldMaskPaths{}; + __block std::vector fieldMaskPaths; __block FSTObjectValue *updateData = [FSTObjectValue objectValue]; FSTParseContext *context = [FSTParseContext contextWithSource:FSTUserDataSourceUpdate path:absl::make_unique(FieldPath::EmptyPath())]; [dict enumerateKeysAndObjectsUsingBlock:^(id key, id value, BOOL *stop) { - FieldPath path{}; + FieldPath path; if ([key isKindOfClass:[NSString class]]) { path = [FIRFieldPath pathWithDotSeparatedString:key].internalValue; -- cgit v1.2.3