mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 05:34:18 +08:00
[1/N] Change C-style casts to static_cast or reinterpret_cast (#165750)
This series of changes try to cover C style casts into C++ alternatives. Pull Request resolved: https://github.com/pytorch/pytorch/pull/165750 Approved by: https://github.com/Skylion007
This commit is contained in:
committed by
PyTorch MergeBot
parent
767199fd9b
commit
e1e8491b31
@ -13,7 +13,7 @@ RegisterWorkerInfoOnce::RegisterWorkerInfoOnce() {
|
||||
}
|
||||
|
||||
WorkerInfo::WorkerInfo(std::string name, int64_t id)
|
||||
: WorkerInfo(std::move(name), (worker_id_t)id) {
|
||||
: WorkerInfo(std::move(name), static_cast<worker_id_t>(id)) {
|
||||
TORCH_CHECK(
|
||||
id <= std::numeric_limits<worker_id_t>::max(),
|
||||
"RPC worker id ",
|
||||
|
Reference in New Issue
Block a user