diff options
author | Gil <mcg@google.com> | 2017-11-07 09:42:39 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-07 09:42:39 -0800 |
commit | fc9b5447fc865866112f195603cfebcefc909ce8 (patch) | |
tree | 8b71d8b098810bbd86d575df66efd67841d7bfa8 | |
parent | 8d6a574e458d9888cf800f0229ea2b7615646516 (diff) |
Clang-format Objective-C++ too (#419)
-rw-r--r-- | Firestore/Example/Tests/Local/FSTLevelDBMutationQueueTests.mm | 2 | ||||
-rw-r--r-- | Firestore/Example/Tests/Local/FSTWriteGroupTests.mm | 2 | ||||
-rw-r--r-- | Firestore/Source/Local/FSTLevelDBKey.mm | 4 | ||||
-rw-r--r-- | Firestore/Source/Local/FSTLevelDBMutationQueue.mm | 28 | ||||
-rw-r--r-- | Firestore/Source/Local/FSTLevelDBQueryCache.mm | 17 | ||||
-rw-r--r-- | Firestore/Source/Local/FSTLevelDBRemoteDocumentCache.mm | 10 | ||||
-rw-r--r-- | Firestore/Source/Local/FSTWriteGroup.mm | 8 | ||||
-rwxr-xr-x | scripts/style.sh | 2 |
8 files changed, 39 insertions, 34 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; diff --git a/scripts/style.sh b/scripts/style.sh index 3c2ac10..0c19f45 100755 --- a/scripts/style.sh +++ b/scripts/style.sh @@ -20,7 +20,7 @@ find . \ -name 'Messaging' -prune -o \ -name 'Storage' -prune -o \ -name 'Pods' -prune -o \ - -name '*.[mh]' \ + \( -name '*.[mh]' -o -name '*.mm' \) \ -not -name '*.pbobjc.*' \ -not -name '*.pbrpc.*' \ -print0 | xargs -0 clang-format -style=file -i |