Merge pull request #12371 from lioncash/span

VideoCommon: Use std::span for BoundingBox::Write()
This commit is contained in:
Tilka
2023-12-12 20:47:08 +00:00
committed by GitHub
15 changed files with 19 additions and 20 deletions

View File

@ -51,7 +51,7 @@ void BoundingBox::Flush()
for (u32 i = start; i < end; ++i)
m_dirty[i] = false;
Write(start, std::vector<BBoxType>(m_values.begin() + start, m_values.begin() + end));
Write(start, std::span(m_values.begin() + start, m_values.begin() + end));
}
}

View File

@ -5,6 +5,7 @@
#include <array>
#include <memory>
#include <span>
#include <vector>
#include "Common/CommonTypes.h"
@ -38,8 +39,7 @@ public:
protected:
virtual std::vector<BBoxType> Read(u32 index, u32 length) = 0;
// TODO: This can likely use std::span once we're on C++20
virtual void Write(u32 index, const std::vector<BBoxType>& values) = 0;
virtual void Write(u32 index, std::span<const BBoxType> values) = 0;
private:
void Readback();