API: removed file size limitation

This commit is contained in:
SChernykh
2023-09-16 19:38:16 +02:00
parent a9d39f0803
commit 0b544bf55a
6 changed files with 105 additions and 14 deletions

View File

@@ -91,11 +91,11 @@ static FORCEINLINE bool from_hex(char c, T& out_value) {
return false;
}
template<typename T, bool is_signed> struct abs_helper {};
template<typename T> struct abs_helper<T, false> { static FORCEINLINE T value(T x) { return x; } };
template<typename T> struct abs_helper<T, true> { static FORCEINLINE T value(T x) { return (x >= 0) ? x : -x; } };
template<typename T, bool is_signed> struct is_negative_helper {};
template<typename T> struct is_negative_helper<T, false> { static FORCEINLINE bool value(T) { return false; } };
template<typename T> struct is_negative_helper<T, true> { static FORCEINLINE bool value(T x) { return (x < 0); } };
template<typename T> FORCEINLINE T abs(T x) { return abs_helper<T, std::is_signed<T>::value>::value(x); }
template<typename T> FORCEINLINE bool is_negative(T x) { return is_negative_helper<T, std::is_signed<T>::value>::value(x); }
template<typename T, typename U>
FORCEINLINE void writeVarint(T value, U&& callback)