From 4fa6821e0645ff61a9380cd090abff472205c630 Mon Sep 17 00:00:00 2001 From: Lexi Winter Date: Sun, 29 Jun 2025 17:16:22 +0100 Subject: add clang-tidy support --- nihil.util/capture_stream.ccm | 5 +++-- nihil.util/parse_size.ccm | 10 +++++----- 2 files changed, 8 insertions(+), 7 deletions(-) (limited to 'nihil.util') diff --git a/nihil.util/capture_stream.ccm b/nihil.util/capture_stream.ccm index 3333505..7ec39a9 100644 --- a/nihil.util/capture_stream.ccm +++ b/nihil.util/capture_stream.ccm @@ -24,10 +24,11 @@ struct capture_stream { m_stream->rdbuf(m_buffer.rdbuf()); } - ~capture_stream() { + ~capture_stream() + { if (m_old_streambuf == nullptr) return; - release(); + m_stream->rdbuf(m_old_streambuf); } /* diff --git a/nihil.util/parse_size.ccm b/nihil.util/parse_size.ccm index c692578..c95ac50 100644 --- a/nihil.util/parse_size.ccm +++ b/nihil.util/parse_size.ccm @@ -29,11 +29,11 @@ auto get_multiplier(Char c) -> std::expected auto ret = std::uint64_t{1}; switch (c) { - case 'p': case 'P': ret *= 1024; - case 't': case 'T': ret *= 1024; - case 'g': case 'G': ret *= 1024; - case 'm': case 'M': ret *= 1024; - case 'k': case 'K': ret *= 1024; + case 'p': case 'P': ret *= 1024; //NOLINT + case 't': case 'T': ret *= 1024; //NOLINT + case 'g': case 'G': ret *= 1024; //NOLINT + case 'm': case 'M': ret *= 1024; //NOLINT + case 'k': case 'K': ret *= 1024; //NOLINT return ret; default: -- cgit v1.2.3