Skip to content

Commit c736372

Browse files
committed
style: update clang-format to v20
ACP-21694
1 parent 8d9714e commit c736372

File tree

6 files changed

+14
-22
lines changed

6 files changed

+14
-22
lines changed

.github/workflows/format.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ jobs:
88

99
steps:
1010
- uses: actions/checkout@v2
11-
- uses: DoozyX/clang-format-lint-action@v0.13
11+
- uses: DoozyX/clang-format-lint-action@v0.20
1212
with:
1313
source: 'p4-fusion tests'
1414
extensions: 'h,cc'
15-
clangFormatVersion: 12.0.1
15+
clangFormatVersion: 20

p4-fusion/commands/change_list.cc

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,7 @@ void ChangeList::PrepareDownload(const BranchSet& branchSet)
5656

5757
std::unique_lock<std::mutex> lock(*cl.stateMutex);
5858
cl.state = Described;
59-
cl.stateCV->notify_all();
60-
});
59+
cl.stateCV->notify_all(); });
6160
}
6261

6362
void ChangeList::StartDownloadAndLFSUpload(int nPrintBatch)
@@ -108,8 +107,7 @@ void ChangeList::StartDownloadAndLFSUpload(int nPrintBatch)
108107

109108
// Download any remaining files that were smaller in number than the total batch size.
110109
// Additionally, signal the batch processing end.
111-
cl.DownloadBatch(printBatchFiles, printBatchFileData);
112-
});
110+
cl.DownloadBatch(printBatchFiles, printBatchFileData); });
113111
}
114112

115113
void ChangeList::DownloadBatch(std::shared_ptr<std::vector<std::string>> printBatchFiles, std::shared_ptr<std::vector<FileData*>> printBatchFileData)
@@ -160,8 +158,7 @@ void ChangeList::DownloadBatch(std::shared_ptr<std::vector<std::string>> printBa
160158
{
161159
state = CommitReady;
162160
stateCV->notify_all();
163-
}
164-
});
161+
} });
165162
}
166163

167164
void ChangeList::WaitForBeingCommitReady()

p4-fusion/lfs/communication/lfscomm.cc

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ const char* GetUserAgent()
3030
if (version_info && version_info->version)
3131
{
3232
result = std::string("curl/") + version_info->version;
33-
}
34-
});
33+
} });
3534

3635
return result.c_str();
3736
}
@@ -200,8 +199,7 @@ RequestResult PerformPostRequestWithRetry(CURL* curl,
200199
curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &result.response_code);
201200
}
202201

203-
return result;
204-
});
202+
return result; });
205203
}
206204

207205
// Helper function to perform a PUT request with binary data
@@ -224,8 +222,7 @@ RequestResult PerformPutRequestWithRetry(CURL* curl, const std::string& url,
224222
curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &result.response_code);
225223
}
226224

227-
return result;
228-
});
225+
return result; });
229226
}
230227

231228
struct BatchResponse
@@ -407,8 +404,7 @@ Communicator::UploadResult PerformUpload(const std::string& uploadUrl, const std
407404
{
408405
curl_easy_getinfo(curl.get(), CURLINFO_RESPONSE_CODE, &uploadResult.response_code);
409406
}
410-
return uploadResult;
411-
});
407+
return uploadResult; });
412408

413409
curl_slist_free_all(uploadHeaders);
414410

@@ -466,8 +462,7 @@ bool PerformVerify(const std::string& verifyUrl, const std::string& oid, size_t
466462
{
467463
curl_easy_getinfo(curl.get(), CURLINFO_RESPONSE_CODE, &verifyResult.response_code);
468464
}
469-
return verifyResult;
470-
});
465+
return verifyResult; });
471466

472467
curl_slist_free_all(verifyHeaders);
473468

p4-fusion/lfs/communication/s3comm.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Communicator::UploadResult S3Comm::UploadFile(const std::vector<char>& fileConte
3737

3838
std::string objectKey = m_Repository + "/" + oid;
3939

40-
//Check if object already exists
40+
// Check if object already exists
4141
Aws::S3::Model::HeadObjectRequest headRequest;
4242
headRequest.SetBucket(m_Bucket);
4343
headRequest.SetKey(objectKey);

p4-fusion/p4_api.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,8 @@ ChangesResult P4API::Changes(const std::string& path, const std::string& from, i
205205
{
206206
std::vector<std::string> args = {
207207
"-l", // Get full descriptions instead of sending cut-short ones
208-
"-s", "submitted", // Only include submitted CLs
208+
"-s",
209+
"submitted", // Only include submitted CLs
209210
};
210211

211212
// This needs to be declared outside the if scope below to

p4-fusion/thread_pool.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,7 @@ void ThreadPool::Initialize(int size, LFSClient* lfsClient)
134134
m_ThreadExceptions[i] = std::current_exception();
135135
}
136136
m_JobsProcessing--;
137-
}
138-
}));
137+
} }));
139138
}
140139
}
141140

0 commit comments

Comments
 (0)