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/Example/Tests/Util/FSTHelpers.mm | 2 +- Firestore/Source/API/FIRFieldPath.mm | 2 +- Firestore/Source/API/FSTUserDataConverter.mm | 12 ++++++------ Firestore/Source/Local/FSTLevelDBKey.mm | 2 +- Firestore/core/src/firebase/firestore/local/leveldb_key.cc | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Firestore/Example/Tests/Util/FSTHelpers.mm b/Firestore/Example/Tests/Util/FSTHelpers.mm index dbd19aa..bc2f005 100644 --- a/Firestore/Example/Tests/Util/FSTHelpers.mm +++ b/Firestore/Example/Tests/Util/FSTHelpers.mm @@ -250,7 +250,7 @@ FSTPatchMutation *FSTTestPatchMutation(const absl::string_view path, BOOL merge = !updateMask.empty(); __block FSTObjectValue *objectValue = [FSTObjectValue objectValue]; - __block std::vector fieldMaskPaths{}; + __block std::vector fieldMaskPaths; [values enumerateKeysAndObjectsUsingBlock:^(NSString *key, id value, BOOL *stop) { const FieldPath path = testutil::Field(util::MakeStringView(key)); fieldMaskPaths.push_back(path); 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; 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 path_segments{}; + std::vector path_segments; for (;;) { // Advance a temporary slice to avoid advancing contents into the next key component which may // not be a path segment. diff --git a/Firestore/core/src/firebase/firestore/local/leveldb_key.cc b/Firestore/core/src/firebase/firestore/local/leveldb_key.cc index 7febe71..3a4e512 100644 --- a/Firestore/core/src/firebase/firestore/local/leveldb_key.cc +++ b/Firestore/core/src/firebase/firestore/local/leveldb_key.cc @@ -534,7 +534,7 @@ class Writer { OrderedCode::WriteString(&dest_, value); } - std::string dest_{}; + std::string dest_; }; } // namespace -- cgit v1.2.3