coreinit: Implement several FSA functions and fix some bugs (#844)

This commit is contained in:
Maschell 2023-06-15 21:05:16 +02:00 committed by GitHub
parent ae4cb45cf3
commit f1ebfa9941
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 1032 additions and 121 deletions

View file

@ -49,6 +49,13 @@ public:
m_tempData.insert(m_tempData.end(), count - l.size(), T());
}
template <size_t N>
SysAllocator(const char(&str)[N])
{
m_tempData.reserve(count);
m_tempData.insert(m_tempData.begin(), str, str + N);
}
constexpr uint32 GetCount() const
{
return count;
@ -135,6 +142,9 @@ private:
std::vector<T> m_tempData;
};
template <size_t N>
SysAllocator(const char(&str)[N]) -> SysAllocator<char, N>;
template<typename T>
class SysAllocator<T, 1> : public SysAllocatorBase
{