TimingEvents: Remove pointer indirection

Probably should move this to one big array for locality.
This commit is contained in:
Stenzek
2024-07-19 22:56:37 +10:00
parent 56dd9878e1
commit 4f7ddfaae6
16 changed files with 210 additions and 224 deletions

View File

@ -77,6 +77,14 @@ void StateWrapper::Do(SmallStringBase* value_ptr)
value_ptr->update_size();
}
void StateWrapper::Do(std::string_view* value_ptr)
{
Assert(m_mode == Mode::Write);
u32 length = static_cast<u32>(value_ptr->length());
Do(&length);
DoBytes(const_cast<char*>(value_ptr->data()), length);
}
bool StateWrapper::DoMarker(const char* marker)
{
SmallString file_value(marker);

View File

@ -108,6 +108,7 @@ public:
void Do(bool* value_ptr);
void Do(std::string* value_ptr);
void Do(std::string_view* value_ptr);
void Do(SmallStringBase* value_ptr);
template<typename T, size_t N>