Skip to content

Commit 6bdae60

Browse files
frgossenGoogle-ML-Automation
authored andcommitted
[Cleanup] Use push_back instead of emplace_back where appropriate (go/totw/112)
PiperOrigin-RevId: 707691748
1 parent 59a3e6e commit 6bdae60

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

xla/tsl/platform/cloud/gcs_dns_cache.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ void GcsDnsCache::AnnotateRequest(HttpRequest* request) {
197197
LOG(ERROR) << "Error converting response to IP address for " << name
198198
<< ": " << strerror(errno);
199199
} else {
200-
output.emplace_back(buf);
200+
output.push_back(buf);
201201
VLOG(1) << "... address: " << buf;
202202
}
203203
}

xla/tsl/platform/default/cuda_root_path.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,17 @@ std::vector<std::string> CandidateCudaRoots() {
4646
std::string executable_path = tsl::Env::Default()->GetExecutablePath();
4747
std::string cuda_nvcc_dir =
4848
io::JoinPath(executable_path + "." + runfiles_suffix, "cuda_nvcc");
49-
roots.emplace_back(cuda_nvcc_dir);
49+
roots.push_back(cuda_nvcc_dir);
5050

5151
// The CUDA candidate root for python targets.
5252
std::string runfiles_dir = tsl::Env::Default()->GetRunfilesDir();
5353
std::size_t runfiles_ind = runfiles_dir.rfind(runfiles_suffix);
5454
cuda_nvcc_dir = io::JoinPath(
5555
runfiles_dir.substr(0, runfiles_ind + runfiles_suffix.length()),
5656
"cuda_nvcc");
57-
roots.emplace_back(cuda_nvcc_dir);
57+
roots.push_back(cuda_nvcc_dir);
5858

59-
roots.emplace_back(TF_CUDA_TOOLKIT_PATH);
59+
roots.push_back(TF_CUDA_TOOLKIT_PATH);
6060
roots.emplace_back(std::string("/usr/local/cuda"));
6161

6262
#if defined(PLATFORM_POSIX) && !defined(__APPLE__)

0 commit comments

Comments
 (0)