From 8bbeee11734d3ba8e2cf15d19cb3c302f8bfdbf2 Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Sat, 7 Dec 2024 18:51:18 +0100 Subject: core: Add clang-tidy (#8664) This adds a .clang-tidy file for us. It's not a strict requirement to be compliant, but I tuned it to be alright. --- src/helpers/ByteOperations.hpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/helpers/ByteOperations.hpp') diff --git a/src/helpers/ByteOperations.hpp b/src/helpers/ByteOperations.hpp index 13e98500..bdd429dc 100644 --- a/src/helpers/ByteOperations.hpp +++ b/src/helpers/ByteOperations.hpp @@ -30,25 +30,27 @@ constexpr LD operator""_TB(const LD BYTES) { return BYTES * 1024 * 1024 * 1024 * 1024; } +//NOLINTBEGIN template -using __acceptable_byte_operation_type = typename std::enable_if::value || std::is_trivially_constructible::value>::type; +using internal_hl_acceptable_byte_operation_type = typename std::enable_if::value || std::is_trivially_constructible::value>::type; -template > +template > constexpr X kBtoBytes(const X kB) { return kB * 1024; } -template > +template > constexpr X MBtoBytes(const X MB) { return MB * 1024 * 1024; } -template > +template > constexpr X GBtoBytes(const X GB) { return GB * 1024 * 1024 * 1024; } -template > +template > constexpr X TBtoBytes(const X TB) { return TB * 1024 * 1024 * 1024 * 1024; } +//NOLINTEND #undef ULL #undef LD \ No newline at end of file -- cgit v1.2.3