Match but don't link CSegIdList (rstl::vector inlining)

Former-commit-id: dc69b9f2fd
This commit is contained in:
2022-10-14 22:22:32 -07:00
parent 9a35941d7c
commit ff2b38dc53
11 changed files with 105 additions and 47 deletions

View File

@@ -7,7 +7,7 @@ class CInputStream;
template < typename T >
struct TType {};
template < typename T >
inline T cinput_stream_helper(const TType< T >& type, CInputStream& in);
T cinput_stream_helper(const TType< T >& type, CInputStream& in);
class CInputStream {
public:
@@ -52,6 +52,11 @@ private:
uint x20_bitOffset;
};
template <typename T>
inline T cinput_stream_helper(const TType<T>& type, CInputStream& in) {
return T(in);
}
template <>
inline int cinput_stream_helper(const TType< int >& type, CInputStream& in) {
return in.ReadLong();
@@ -89,8 +94,8 @@ inline rstl::pair< L, R > cinput_stream_helper(const TType< rstl::pair< L, R > >
}
#include "rstl/vector.hpp"
template < typename T, typename A >
inline rstl::vector< T, A >::vector(CInputStream& in)
template < typename T, typename Alloc >
inline rstl::vector< T, Alloc >::vector(CInputStream& in, const Alloc& allocator)
: x4_count(0), x8_capacity(0), xc_items(nullptr) {
int count = in.ReadInt32();
reserve(count);