aboutsummaryrefslogtreecommitdiffstats
path: root/nihil.util
diff options
context:
space:
mode:
authorLexi Winter <lexi@le-fay.org>2025-06-29 17:16:22 +0100
committerLexi Winter <lexi@le-fay.org>2025-06-29 17:16:22 +0100
commit4fa6821e0645ff61a9380cd090abff472205c630 (patch)
treebd95f13b2dc0bd9692681f50c365d2914a520bfe /nihil.util
parente5180acf5f2dfac788e8c12886095ed1ac66fae5 (diff)
downloadnihil-4fa6821e0645ff61a9380cd090abff472205c630.tar.gz
nihil-4fa6821e0645ff61a9380cd090abff472205c630.tar.bz2
add clang-tidy support
Diffstat (limited to 'nihil.util')
-rw-r--r--nihil.util/capture_stream.ccm5
-rw-r--r--nihil.util/parse_size.ccm10
2 files changed, 8 insertions, 7 deletions
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<std::uint64_t, error>
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: