All: Cleanup all files
Add newline to end of files and remove whitespace from end of lines
This commit is contained in:
@@ -39,7 +39,7 @@ namespace BAN
|
||||
const Span<T> span() const { return Span(m_data, size()); }
|
||||
|
||||
constexpr size_type size() const;
|
||||
|
||||
|
||||
const T* data() const { return m_data; }
|
||||
T* data() { return m_data; }
|
||||
|
||||
@@ -109,4 +109,4 @@ namespace BAN
|
||||
return S;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,4 +39,4 @@ namespace BAN
|
||||
T m_value;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@ namespace BAN
|
||||
}
|
||||
|
||||
value_type* data() { return m_data; }
|
||||
const value_type* data() const { return m_data; }
|
||||
const value_type* data() const { return m_data; }
|
||||
|
||||
size_type size() const { return m_size; }
|
||||
|
||||
@@ -137,4 +137,4 @@ namespace BAN
|
||||
using ByteSpan = ByteSpanGeneral<false>;
|
||||
using ConstByteSpan = ByteSpanGeneral<true>;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace BAN
|
||||
size_type size() const { return m_size; }
|
||||
bool empty() const { return size() == 0; }
|
||||
bool full() const { return size() == capacity(); }
|
||||
|
||||
|
||||
static constexpr size_type capacity() { return S; }
|
||||
|
||||
private:
|
||||
@@ -110,4 +110,4 @@ namespace BAN
|
||||
return (T*)(m_storage + index * sizeof(T));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,4 +77,4 @@ namespace BAN
|
||||
T raw;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -192,7 +192,7 @@ namespace BAN::Formatter
|
||||
|
||||
if (sign)
|
||||
*(--ptr) = '-';
|
||||
|
||||
|
||||
print(putc, ptr);
|
||||
}
|
||||
|
||||
@@ -205,10 +205,10 @@ namespace BAN::Formatter
|
||||
frac_part = -frac_part;
|
||||
|
||||
print_integer(putc, int_part, format);
|
||||
|
||||
|
||||
if (format.percision > 0)
|
||||
putc('.');
|
||||
|
||||
|
||||
for (int i = 0; i < format.percision; i++)
|
||||
{
|
||||
frac_part *= format.base;
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace BAN
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
void clear()
|
||||
{
|
||||
if (*this)
|
||||
@@ -145,4 +145,4 @@ namespace BAN
|
||||
alignas(CallableBase) uint8_t m_storage[m_size] { 0 };
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,4 +47,4 @@ namespace BAN
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ namespace BAN
|
||||
ErrorOr<void> rebucket(size_type);
|
||||
LinkedList<Entry>& get_bucket(const Key&);
|
||||
const LinkedList<Entry>& get_bucket(const Key&) const;
|
||||
|
||||
|
||||
private:
|
||||
Vector<LinkedList<Entry>> m_buckets;
|
||||
size_type m_size = 0;
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace BAN
|
||||
using size_type = size_t;
|
||||
using iterator = IteratorDouble<T, Vector, LinkedList, HashSet>;
|
||||
using const_iterator = ConstIteratorDouble<T, Vector, LinkedList, HashSet>;
|
||||
|
||||
|
||||
public:
|
||||
HashSet() = default;
|
||||
HashSet(const HashSet&);
|
||||
@@ -206,4 +206,4 @@ namespace BAN
|
||||
template<typename T, typename HASH = hash<T>>
|
||||
using HashSetUnstable = HashSet<T, HASH, false>;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,4 +9,4 @@ namespace BAN
|
||||
Break
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -287,7 +287,7 @@ namespace BAN
|
||||
{
|
||||
Node* node = (Node*)BAN::allocator(sizeof(Node));
|
||||
if (node == nullptr)
|
||||
return Error::from_errno(ENOMEM);
|
||||
return Error::from_errno(ENOMEM);
|
||||
return node;
|
||||
}
|
||||
|
||||
@@ -396,4 +396,4 @@ namespace BAN
|
||||
return m_current;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -119,4 +119,4 @@ namespace BAN::Math
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ namespace BAN
|
||||
Optional<T>::Optional(const T& value)
|
||||
: m_has_value(true)
|
||||
{
|
||||
new (m_storage) T(value);
|
||||
new (m_storage) T(value);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
@@ -192,4 +192,4 @@ namespace BAN
|
||||
m_has_value = false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -225,4 +225,4 @@ namespace BAN
|
||||
return {};
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,4 +25,4 @@ namespace BAN
|
||||
bool m_enabled { true };
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ namespace BAN::sort
|
||||
|
||||
if (parent == 0)
|
||||
break;
|
||||
|
||||
|
||||
parent--;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,4 +131,4 @@ namespace BAN
|
||||
return Span(m_data + start, length);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace BAN
|
||||
|
||||
bool empty() const;
|
||||
size_type size() const;
|
||||
|
||||
|
||||
const char* data() const;
|
||||
|
||||
private:
|
||||
|
||||
@@ -34,4 +34,4 @@ namespace BAN::Formatter
|
||||
print(putc, "{} {} {} {2}:{2}:{2} GMT+0 {4}", week_days[time.week_day], months[time.month], time.day, time.hour, time.minute, time.second, time.year);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,4 +102,4 @@ namespace BAN
|
||||
template<typename T> struct equal { constexpr bool operator()(const T& lhs, const T& rhs) const { return lhs == rhs; } };
|
||||
template<typename T> struct greater { constexpr bool operator()(const T& lhs, const T& rhs) const { return lhs > rhs; } };
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace BAN::UTF8
|
||||
for (uint32_t i = 1; i < length; i++)
|
||||
if ((bytes[i] & 0xC0) != 0x80)
|
||||
return UTF8::invalid;
|
||||
|
||||
|
||||
switch (length)
|
||||
{
|
||||
case 1: return ((bytes[0] & 0x80) != 0x00) ? UTF8::invalid : bytes[0];
|
||||
@@ -78,4 +78,4 @@ namespace BAN::UTF8
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ namespace BAN
|
||||
T* operator->()
|
||||
{
|
||||
ASSERT(m_pointer);
|
||||
return m_pointer;
|
||||
return m_pointer;
|
||||
}
|
||||
|
||||
const T* operator->() const
|
||||
@@ -95,4 +95,4 @@ namespace BAN
|
||||
friend class UniqPtr;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -140,14 +140,14 @@ namespace BAN
|
||||
Variant(T&& value) requires (can_have<T>() && !is_lvalue_reference_v<T>)
|
||||
: m_index(detail::index<T, Ts...>())
|
||||
{
|
||||
new (m_storage) T(move(value));
|
||||
new (m_storage) T(move(value));
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
Variant(const T& value) requires (can_have<T>() && !is_lvalue_reference_v<T>)
|
||||
: m_index(detail::index<T, Ts...>())
|
||||
{
|
||||
new (m_storage) T(value);
|
||||
new (m_storage) T(value);
|
||||
}
|
||||
|
||||
~Variant()
|
||||
@@ -292,4 +292,4 @@ namespace BAN
|
||||
size_t m_index { invalid_index() };
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace BAN
|
||||
ErrorOr<void> emplace(size_type, Args&&...);
|
||||
ErrorOr<void> insert(size_type, T&&);
|
||||
ErrorOr<void> insert(size_type, const T&);
|
||||
|
||||
|
||||
iterator begin() { return iterator(m_data); }
|
||||
iterator end() { return iterator(m_data + m_size); }
|
||||
const_iterator begin() const { return const_iterator(m_data); }
|
||||
|
||||
@@ -104,4 +104,4 @@ namespace BAN
|
||||
friend class Weakable<T>;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user