Skip to content

Commit e52e3ec

Browse files
committed
Fix formating
1 parent 680fef2 commit e52e3ec

File tree

7 files changed

+17
-19
lines changed

7 files changed

+17
-19
lines changed

storage/src/android/storage_android.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -477,8 +477,8 @@ void StorageInternal::UseEmulator(const char* host, int port) {
477477
JNIEnv* env = app_->GetJNIEnv();
478478
FIREBASE_ASSERT_MESSAGE_RETURN_VOID((host != nullptr && host[0] != '\0'),
479479
"Emulator host cannot be null or empty.")
480-
FIREBASE_ASSERT_MESSAGE_RETURN_VOID((port > 0),
481-
"Emulator port must be a positive number.")
480+
FIREBASE_ASSERT_MESSAGE_RETURN_VOID(
481+
(port > 0), "Emulator port must be a positive number.")
482482

483483
jobject host_string = env->NewStringUTF(host);
484484
jint port_num = static_cast<jint>(port);

storage/src/common/storage.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,7 @@ void Storage::set_max_operation_retry_time(double max_transfer_retry_seconds) {
227227
}
228228

229229
void Storage::UseEmulator(const char* host, int port) {
230-
if (internal_)
231-
internal_->UseEmulator(host, port);
230+
if (internal_) internal_->UseEmulator(host, port);
232231
}
233232

234233
} // namespace storage

storage/src/desktop/metadata_desktop.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,8 @@ const char* MetadataInternal::download_url() const {
133133

134134
std::string MetadataInternal::GetPathFromToken(const std::string& token) const {
135135
std::string http_url =
136-
StoragePath(storage_internal_, "gs://" + bucket_ + "/" + path_).AsHttpUrl();
136+
StoragePath(storage_internal_, "gs://" + bucket_ + "/" + path_)
137+
.AsHttpUrl();
137138
if (!token.empty()) http_url += "&token=" + token;
138139
return http_url;
139140
}

storage/src/desktop/storage_desktop.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ class StorageInternal {
110110
int get_port() { return port_; }
111111

112112
// Returns the url scheme currenly in use for the storage backend
113-
std::string get_scheme() {return scheme_;}
113+
std::string get_scheme() { return scheme_; }
114114

115115
private:
116116
// Clean up completed operations.
@@ -136,7 +136,6 @@ class StorageInternal {
136136
std::string scheme_ = "https";
137137
int port_ = 443;
138138
bool configured_;
139-
140139
};
141140

142141
} // namespace internal

storage/src/desktop/storage_path.cc

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616

1717
#include <string.h>
1818

19-
#include <string>
2019
#include <iostream>
20+
#include <string>
2121

2222
#include "app/rest/util.h"
2323
#include "app/src/include/firebase/internal/common.h"
@@ -42,7 +42,7 @@ const char kBucketEndString[] = "/o/";
4242
const size_t kBucketEndStringLength = FIREBASE_STRLEN(kBucketEndString);
4343
const char kBucketIdentifierString[] = "/v0/b/";
4444

45-
StoragePath::StoragePath(StorageInternal *storage, const std::string& path) {
45+
StoragePath::StoragePath(StorageInternal* storage, const std::string& path) {
4646
storage_internal_ = storage;
4747
bucket_ = "";
4848
path_ = Path("");
@@ -60,9 +60,8 @@ StoragePath::StoragePath(StorageInternal *storage, const std::string& path) {
6060

6161
// Constructs a storage path, based on raw strings for the bucket, path, and
6262
// object.
63-
StoragePath::StoragePath(StorageInternal *storage,
64-
const std::string& bucket, const std::string& path,
65-
const std::string& object) {
63+
StoragePath::StoragePath(StorageInternal* storage, const std::string& bucket,
64+
const std::string& path, const std::string& object) {
6665
storage_internal_ = storage;
6766
bucket_ = bucket;
6867
path_ = Path(path).GetChild(object);

storage/src/desktop/storage_path.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ class StoragePath {
3737

3838
// Constructs a storage path, based on an input URL. The URL can either be
3939
// an HTTP[s] link, or a gs URI.
40-
explicit StoragePath(StorageInternal *storage, const std::string& path);
40+
explicit StoragePath(StorageInternal* storage, const std::string& path);
4141

4242
// Constructs a storage path, based on raw strings for the bucket, path, and
4343
// object.
44-
StoragePath(StorageInternal *storage, const std::string& bucket, const std::string& path,
45-
const std::string& object = "");
44+
StoragePath(StorageInternal* storage, const std::string& bucket,
45+
const std::string& path, const std::string& object = "");
4646

4747
// The bucket portion of this path.
4848
// In the path: MyBucket/folder/object, it would return "MyBucket".
@@ -84,16 +84,16 @@ class StoragePath {
8484
private:
8585
static const char* const kSeparator;
8686

87-
StoragePath(StorageInternal *storage, const std::string& bucket, const Path& path)
88-
: storage_internal_(storage), bucket_(bucket), path_(path) {}
87+
StoragePath(StorageInternal* storage, const std::string& bucket,
88+
const Path& path)
89+
: storage_internal_(storage), bucket_(bucket), path_(path) {}
8990

9091
void ConstructFromGsUri(const std::string& uri, int path_start);
9192
void ConstructFromHttpUrl(const std::string& url, int path_start);
9293

9394
std::string bucket_;
9495
Path path_;
9596
StorageInternal* storage_internal_;
96-
9797
};
9898

9999
} // namespace internal

storage/src/desktop/storage_reference_desktop.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ namespace internal {
4848

4949
StorageReferenceInternal::StorageReferenceInternal(
5050
const std::string& storageUri, StorageInternal* storage)
51-
: storage_(storage), storageUri_(storage, storageUri) {
51+
: storage_(storage), storageUri_(storage, storageUri) {
5252
storage_->future_manager().AllocFutureApi(this, kStorageReferenceFnCount);
5353
}
5454

0 commit comments

Comments
 (0)