From f04abbb30d98d5173049c23baee87d2617abc7cc Mon Sep 17 00:00:00 2001 From: Mark Bicknell Date: Wed, 27 Mar 2024 11:27:57 +0000 Subject: [PATCH] Code review changes --- dorado/read_pipeline/HtsWriter.cpp | 2 +- dorado/utils/cuda_utils.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dorado/read_pipeline/HtsWriter.cpp b/dorado/read_pipeline/HtsWriter.cpp index a3348a4b..7c62b316 100644 --- a/dorado/read_pipeline/HtsWriter.cpp +++ b/dorado/read_pipeline/HtsWriter.cpp @@ -18,7 +18,7 @@ namespace dorado { using OutputMode = dorado::utils::HtsFile::OutputMode; HtsWriter::HtsWriter(utils::HtsFile& file, std::string gpu_names) - : MessageSink(10000, 1), m_file(file), m_gpu_names(gpu_names) { + : MessageSink(10000, 1), m_file(file), m_gpu_names(std::move(gpu_names)) { if (!m_gpu_names.empty()) { m_gpu_names = "gpu:" + m_gpu_names; } diff --git a/dorado/utils/cuda_utils.cpp b/dorado/utils/cuda_utils.cpp index 0d64a2e5..9875de01 100644 --- a/dorado/utils/cuda_utils.cpp +++ b/dorado/utils/cuda_utils.cpp @@ -210,13 +210,13 @@ std::string get_cuda_gpu_names(std::string device_string) { std::set gpu_strs; std::string gpu_names; - for (auto &dev : dev_info) { + for (const auto &dev : dev_info) { if (dev.in_use) { gpu_strs.insert(dev.device_properties.name); } } - for (auto &gpu_id : gpu_strs) { + for (const auto &gpu_id : gpu_strs) { if (!gpu_names.empty()) { gpu_names += "|"; }