Add storer for vector of pointers.

GitOrigin-RevId: 1e2573f0fcf33eec26f4a17860a406c2a99336bb
This commit is contained in:
levlam 2020-05-25 02:40:00 +03:00
parent 54e5afe41c
commit c36e8d6c78

View File

@ -138,6 +138,13 @@ void store(const vector<T> &vec, StorerT &storer) {
store(val, storer);
}
}
template <class T, class StorerT>
void store(const vector<T *> &vec, StorerT &storer) {
storer.store_binary(narrow_cast<int32>(vec.size()));
for (auto &val : vec) {
store(*val, storer);
}
}
template <class T, class ParserT>
void parse(vector<T> &vec, ParserT &parser) {
uint32 size = parser.fetch_int();