diff options
Diffstat (limited to 'nihil.util')
| -rw-r--r-- | nihil.util/capture_stream.ccm | 5 | ||||
| -rw-r--r-- | nihil.util/parse_size.ccm | 10 |
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: |
