summaryrefslogtreecommitdiff
path: root/src/helpers/ByteOperations.hpp
diff options
context:
space:
mode:
authorVaxry <43317083+vaxerski@users.noreply.github.com>2024-12-07 18:51:18 +0100
committerGitHub <noreply@github.com>2024-12-07 18:51:18 +0100
commit8bbeee11734d3ba8e2cf15d19cb3c302f8bfdbf2 (patch)
tree5b6654818049a0743f62defc090e86d4327cccbb /src/helpers/ByteOperations.hpp
parentb1e5cc66bdb20b002c93479490c3a317552210b3 (diff)
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.
Diffstat (limited to 'src/helpers/ByteOperations.hpp')
-rw-r--r--src/helpers/ByteOperations.hpp12
1 files changed, 7 insertions, 5 deletions
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 <typename T>
-using __acceptable_byte_operation_type = typename std::enable_if<std::is_trivially_constructible<T, ULL>::value || std::is_trivially_constructible<T, LD>::value>::type;
+using internal_hl_acceptable_byte_operation_type = typename std::enable_if<std::is_trivially_constructible<T, ULL>::value || std::is_trivially_constructible<T, LD>::value>::type;
-template <typename X, typename = __acceptable_byte_operation_type<X>>
+template <typename X, typename = internal_hl_acceptable_byte_operation_type<X>>
constexpr X kBtoBytes(const X kB) {
return kB * 1024;
}
-template <typename X, typename = __acceptable_byte_operation_type<X>>
+template <typename X, typename = internal_hl_acceptable_byte_operation_type<X>>
constexpr X MBtoBytes(const X MB) {
return MB * 1024 * 1024;
}
-template <typename X, typename = __acceptable_byte_operation_type<X>>
+template <typename X, typename = internal_hl_acceptable_byte_operation_type<X>>
constexpr X GBtoBytes(const X GB) {
return GB * 1024 * 1024 * 1024;
}
-template <typename X, typename = __acceptable_byte_operation_type<X>>
+template <typename X, typename = internal_hl_acceptable_byte_operation_type<X>>
constexpr X TBtoBytes(const X TB) {
return TB * 1024 * 1024 * 1024 * 1024;
}
+//NOLINTEND
#undef ULL
#undef LD \ No newline at end of file