aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore
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
parentd439bbccd4b90583a89d209d2cc81308aabca8ac (diff)
Remove extraneous braces (#1315)
Diffstat (limited to 'Firestore')
-rw-r--r--Firestore/Example/Tests/Util/FSTHelpers.mm2
-rw-r--r--Firestore/Source/API/FIRFieldPath.mm2
-rw-r--r--Firestore/Source/API/FSTUserDataConverter.mm12
-rw-r--r--Firestore/Source/Local/FSTLevelDBKey.mm2
-rw-r--r--Firestore/core/src/firebase/firestore/local/leveldb_key.cc2
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<FieldPath> fieldMaskPaths{};
+ __block std::vector<FieldPath> 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<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.
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