2022-02-28 03:33:48 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "Runtime/Streams/COutputStream.hpp"
|
|
|
|
#include "Runtime/rstl.hpp"
|
|
|
|
#include <vector>
|
|
|
|
namespace metaforce {
|
|
|
|
template <class T, size_t N>
|
|
|
|
void write_reserved_vector(const rstl::reserved_vector<T, N>& v, COutputStream& out) {
|
2022-03-07 23:53:42 +00:00
|
|
|
out.Put<u32>(v.size());
|
2022-02-28 03:33:48 +00:00
|
|
|
for (const auto& t : v) {
|
|
|
|
out.Put(t);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
template <class T>
|
|
|
|
void write_vector(const std::vector<T>& v, COutputStream& out) {
|
2022-03-07 23:53:42 +00:00
|
|
|
out.Put<u32>(v.size());
|
2022-02-28 03:33:48 +00:00
|
|
|
for (const auto& t : v) {
|
|
|
|
out.Put(t);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} // namespace metaforce
|