Skip to content

Commit

Permalink
Address clang-tidy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
robomics committed Dec 16, 2023
1 parent a95b8ed commit 41a1313
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
7 changes: 4 additions & 3 deletions src/hictk/fix_mcool/fix_mcool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ static std::optional<BalanceConfig> 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);
Expand Down Expand Up @@ -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<std::chrono::milliseconds>(t1 - t0).count();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ inline SingleCellFile::SingleCellFile(HighFive::File fp, BinTable bins, SingleCe
: _root_grp(std::make_unique<RootGroup>(RootGroup{fp.getGroup("/")})),
_cells(read_cells(fp)),
_attrs(std::move(attrs)),
_bins(std::make_shared<const BinTable>(std::move(bins))) {}
_bins(std::make_shared<const BinTable>(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),
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 41a1313

Please sign in to comment.