From 41a13131099183fda7456a9aac8805327ceeb8f4 Mon Sep 17 00:00:00 2001 From: Roberto Rossini <71787608+robomics@users.noreply.github.com> Date: Sat, 16 Dec 2023 16:33:18 +0100 Subject: [PATCH] Address clang-tidy warnings --- src/hictk/fix_mcool/fix_mcool.cpp | 7 ++++--- .../include/hictk/cooler/impl/singlecell_cooler_impl.hpp | 5 +++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/hictk/fix_mcool/fix_mcool.cpp b/src/hictk/fix_mcool/fix_mcool.cpp index 5c75fc49..b3d9f3bf 100644 --- a/src/hictk/fix_mcool/fix_mcool.cpp +++ b/src/hictk/fix_mcool/fix_mcool.cpp @@ -90,7 +90,7 @@ static std::optional detect_balancing_params(std::string_view fil } catch (const std::exception&) { } return c; -} +} // NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks) static void run_hictk_balance(const FixMcoolConfig& c, std::uint32_t resolution) { auto bc = detect_balancing_params(c.path_to_input.string(), resolution); @@ -128,8 +128,9 @@ int fix_mcool_subcmd(const FixMcoolConfig& c) { run_hictk_zoomify(c, resolutions, base_uri); - std::for_each(resolutions.begin() + 1, resolutions.end(), - [&](const auto& res) { run_hictk_balance(c, res); }); + std::for_each(resolutions.begin() + 1, resolutions.end(), [&](const auto& res) { + run_hictk_balance(c, res); // NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks) + }); const auto t1 = std::chrono::system_clock::now(); const auto delta = std::chrono::duration_cast(t1 - t0).count(); diff --git a/src/libhictk/cooler/include/hictk/cooler/impl/singlecell_cooler_impl.hpp b/src/libhictk/cooler/include/hictk/cooler/impl/singlecell_cooler_impl.hpp index 3dac0934..d0d86b89 100644 --- a/src/libhictk/cooler/include/hictk/cooler/impl/singlecell_cooler_impl.hpp +++ b/src/libhictk/cooler/include/hictk/cooler/impl/singlecell_cooler_impl.hpp @@ -84,7 +84,8 @@ inline SingleCellFile::SingleCellFile(HighFive::File fp, BinTable bins, SingleCe : _root_grp(std::make_unique(RootGroup{fp.getGroup("/")})), _cells(read_cells(fp)), _attrs(std::move(attrs)), - _bins(std::make_shared(std::move(bins))) {} + _bins(std::make_shared(std::move(bins))) { +} // NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks) inline SingleCellFile::SingleCellFile(const std::filesystem::path& path, unsigned int mode) : SingleCellFile(HighFive::File(path.string(), mode), @@ -261,7 +262,7 @@ SingleCellFile::read_standard_attributes(const HighFive::File& f, bool initializ internal::read_optional(root_grp, "nchroms", attrs.nchroms, missing_ok); return attrs; -} +} // NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks) DISABLE_WARNING_POP inline BinTable SingleCellFile::init_bin_table(const HighFive::File& f) {