aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore
diff options
context:
space:
mode:
authorGravatar Gil <mcg@google.com>2017-11-07 09:42:39 -0800
committerGravatar GitHub <noreply@github.com>2017-11-07 09:42:39 -0800
commitfc9b5447fc865866112f195603cfebcefc909ce8 (patch)
tree8b71d8b098810bbd86d575df66efd67841d7bfa8 /Firestore
parent8d6a574e458d9888cf800f0229ea2b7615646516 (diff)
Clang-format Objective-C++ too (#419)
Diffstat (limited to 'Firestore')
-rw-r--r--Firestore/Example/Tests/Local/FSTLevelDBMutationQueueTests.mm2
-rw-r--r--Firestore/Example/Tests/Local/FSTWriteGroupTests.mm2
-rw-r--r--Firestore/Source/Local/FSTLevelDBKey.mm4
-rw-r--r--Firestore/Source/Local/FSTLevelDBMutationQueue.mm28
-rw-r--r--Firestore/Source/Local/FSTLevelDBQueryCache.mm17
-rw-r--r--Firestore/Source/Local/FSTLevelDBRemoteDocumentCache.mm10
-rw-r--r--Firestore/Source/Local/FSTWriteGroup.mm8
7 files changed, 38 insertions, 33 deletions
diff --git a/Firestore/Example/Tests/Local/FSTLevelDBMutationQueueTests.mm b/Firestore/Example/Tests/Local/FSTLevelDBMutationQueueTests.mm
index 1e66aac..ea6a895 100644
--- a/Firestore/Example/Tests/Local/FSTLevelDBMutationQueueTests.mm
+++ b/Firestore/Example/Tests/Local/FSTLevelDBMutationQueueTests.mm
@@ -19,12 +19,12 @@
#import <XCTest/XCTest.h>
#include <leveldb/db.h>
-#import "Protos/objc/firestore/local/Mutation.pbobjc.h"
#import "Auth/FSTUser.h"
#import "Local/FSTLevelDB.h"
#import "Local/FSTLevelDBKey.h"
#import "Local/FSTWriteGroup.h"
#include "Port/ordered_code.h"
+#import "Protos/objc/firestore/local/Mutation.pbobjc.h"
#import "FSTMutationQueueTests.h"
#import "FSTPersistenceTestHelpers.h"
diff --git a/Firestore/Example/Tests/Local/FSTWriteGroupTests.mm b/Firestore/Example/Tests/Local/FSTWriteGroupTests.mm
index 1cd2feb..b829ccf 100644
--- a/Firestore/Example/Tests/Local/FSTWriteGroupTests.mm
+++ b/Firestore/Example/Tests/Local/FSTWriteGroupTests.mm
@@ -19,9 +19,9 @@
#import <XCTest/XCTest.h>
#include <leveldb/db.h>
-#import "Protos/objc/firestore/local/Mutation.pbobjc.h"
#import "Local/FSTLevelDB.h"
#import "Local/FSTLevelDBKey.h"
+#import "Protos/objc/firestore/local/Mutation.pbobjc.h"
#import "FSTPersistenceTestHelpers.h"
diff --git a/Firestore/Source/Local/FSTLevelDBKey.mm b/Firestore/Source/Local/FSTLevelDBKey.mm
index ee3e270..1c0af45 100644
--- a/Firestore/Source/Local/FSTLevelDBKey.mm
+++ b/Firestore/Source/Local/FSTLevelDBKey.mm
@@ -18,10 +18,10 @@
#include <string>
-#include "ordered_code.h"
-#include "string_util.h"
#import "FSTDocumentKey.h"
#import "FSTPath.h"
+#include "ordered_code.h"
+#include "string_util.h"
NS_ASSUME_NONNULL_BEGIN
diff --git a/Firestore/Source/Local/FSTLevelDBMutationQueue.mm b/Firestore/Source/Local/FSTLevelDBMutationQueue.mm
index d57a15d..689ea6e 100644
--- a/Firestore/Source/Local/FSTLevelDBMutationQueue.mm
+++ b/Firestore/Source/Local/FSTLevelDBMutationQueue.mm
@@ -21,18 +21,18 @@
#include <set>
#include <string>
-#import "Mutation.pbobjc.h"
-#import "FSTUser.h"
-#import "FSTQuery.h"
+#import "FSTAssert.h"
+#import "FSTDocumentKey.h"
#import "FSTLevelDB.h"
#import "FSTLevelDBKey.h"
#import "FSTLocalSerializer.h"
-#import "FSTWriteGroup.h"
-#import "FSTDocumentKey.h"
#import "FSTMutation.h"
#import "FSTMutationBatch.h"
#import "FSTPath.h"
-#import "FSTAssert.h"
+#import "FSTQuery.h"
+#import "FSTUser.h"
+#import "FSTWriteGroup.h"
+#import "Mutation.pbobjc.h"
#include "ordered_code.h"
#include "string_util.h"
@@ -410,10 +410,11 @@ static ReadOptions StandardReadOptions() {
if (mutationIterator->Valid()) {
foundKeyDescription = [FSTLevelDBKey descriptionForKey:mutationIterator->key()];
}
- FSTFail(@"Dangling document-mutation reference found: "
- @"%@ points to %@; seeking there found %@",
- [FSTLevelDBKey descriptionForKey:indexKey],
- [FSTLevelDBKey descriptionForKey:mutationKey], foundKeyDescription);
+ FSTFail(
+ @"Dangling document-mutation reference found: "
+ @"%@ points to %@; seeking there found %@",
+ [FSTLevelDBKey descriptionForKey:indexKey], [FSTLevelDBKey descriptionForKey:mutationKey],
+ foundKeyDescription);
}
[result addObject:[self decodedMutationBatch:mutationIterator->value()]];
@@ -485,9 +486,10 @@ static ReadOptions StandardReadOptions() {
if (mutationIterator->Valid()) {
foundKeyDescription = [FSTLevelDBKey descriptionForKey:mutationIterator->key()];
}
- FSTFail(@"Dangling document-mutation reference found: "
- @"Missing batch %@; seeking there found %@",
- [FSTLevelDBKey descriptionForKey:mutationKey], foundKeyDescription);
+ FSTFail(
+ @"Dangling document-mutation reference found: "
+ @"Missing batch %@; seeking there found %@",
+ [FSTLevelDBKey descriptionForKey:mutationKey], foundKeyDescription);
}
[result addObject:[self decodedMutationBatch:mutationIterator->value()]];
diff --git a/Firestore/Source/Local/FSTLevelDBQueryCache.mm b/Firestore/Source/Local/FSTLevelDBQueryCache.mm
index c1ba654..c79014d 100644
--- a/Firestore/Source/Local/FSTLevelDBQueryCache.mm
+++ b/Firestore/Source/Local/FSTLevelDBQueryCache.mm
@@ -20,14 +20,14 @@
#include <leveldb/write_batch.h>
#include <string>
-#import "Target.pbobjc.h"
-#import "FSTQuery.h"
+#import "FSTAssert.h"
+#import "FSTDocumentKey.h"
#import "FSTLevelDBKey.h"
#import "FSTLocalSerializer.h"
+#import "FSTQuery.h"
#import "FSTQueryData.h"
#import "FSTWriteGroup.h"
-#import "FSTDocumentKey.h"
-#import "FSTAssert.h"
+#import "Target.pbobjc.h"
#include "ordered_code.h"
#include "string_util.h"
@@ -227,10 +227,11 @@ static ReadOptions GetStandardReadOptions() {
if (targetIterator->Valid()) {
foundKeyDescription = [FSTLevelDBKey descriptionForKey:targetIterator->key()];
}
- FSTFail(@"Dangling query-target reference found: "
- @"%@ points to %@; seeking there found %@",
- [FSTLevelDBKey descriptionForKey:indexKey],
- [FSTLevelDBKey descriptionForKey:targetKey], foundKeyDescription);
+ FSTFail(
+ @"Dangling query-target reference found: "
+ @"%@ points to %@; seeking there found %@",
+ [FSTLevelDBKey descriptionForKey:indexKey], [FSTLevelDBKey descriptionForKey:targetKey],
+ foundKeyDescription);
}
// Finally after finding a potential match, check that the query is actually equal to the
diff --git a/Firestore/Source/Local/FSTLevelDBRemoteDocumentCache.mm b/Firestore/Source/Local/FSTLevelDBRemoteDocumentCache.mm
index e2424b9..67c654e 100644
--- a/Firestore/Source/Local/FSTLevelDBRemoteDocumentCache.mm
+++ b/Firestore/Source/Local/FSTLevelDBRemoteDocumentCache.mm
@@ -20,15 +20,15 @@
#include <leveldb/write_batch.h>
#include <string>
-#import "MaybeDocument.pbobjc.h"
-#import "FSTLevelDBKey.h"
-#import "FSTLocalSerializer.h"
-#import "FSTWriteGroup.h"
+#import "FSTAssert.h"
#import "FSTDocument.h"
#import "FSTDocumentDictionary.h"
#import "FSTDocumentKey.h"
#import "FSTDocumentSet.h"
-#import "FSTAssert.h"
+#import "FSTLevelDBKey.h"
+#import "FSTLocalSerializer.h"
+#import "FSTWriteGroup.h"
+#import "MaybeDocument.pbobjc.h"
#include "ordered_code.h"
#include "string_util.h"
diff --git a/Firestore/Source/Local/FSTWriteGroup.mm b/Firestore/Source/Local/FSTWriteGroup.mm
index e6da131..7ddf642 100644
--- a/Firestore/Source/Local/FSTWriteGroup.mm
+++ b/Firestore/Source/Local/FSTWriteGroup.mm
@@ -20,8 +20,8 @@
#include <leveldb/db.h>
#include <leveldb/write_batch.h>
-#import "FSTLevelDBKey.h"
#import "FSTAssert.h"
+#import "FSTLevelDBKey.h"
#include "ordered_code.h"
@@ -43,7 +43,8 @@ namespace Firestore {
*/
class BatchDescription : public WriteBatch::Handler {
public:
- BatchDescription() : ops_(0), size_(0), message_([NSMutableString string]) {}
+ BatchDescription() : ops_(0), size_(0), message_([NSMutableString string]) {
+ }
virtual ~BatchDescription();
virtual void Put(const Slice &key, const Slice &value);
virtual void Delete(const Slice &key);
@@ -66,7 +67,8 @@ class BatchDescription : public WriteBatch::Handler {
NSMutableString *message_;
};
-BatchDescription::~BatchDescription() {}
+BatchDescription::~BatchDescription() {
+}
void BatchDescription::Put(const Slice &key, const Slice &value) {
ops_ += 1;