| 65 | // Note: does not load data size! |
| 66 | template <class T> |
| 67 | inline void LoadArrayData(TArrayRef<T> data, IBinSaver* binSaver) { |
| 68 | Y_ASSERT(binSaver->IsReading()); |
| 69 | if (IBinSaver::HasNonTrivialSerializer<T>(0u)) { |
| 70 | for (auto& element : data) { |
| 71 | binSaver->Add(0, &element); |
| 72 | } |
| 73 | } else { |
| 74 | binSaver->AddRawData(0, (void*)data.data(), SafeIntegerCast<i64>(sizeof(T) * data.size())); |
| 75 | } |
| 76 | } |
| 77 | |
| 78 | |
| 79 | /* Other smart pointer is incompatible with IObjectsBase/TObj, so we need separate methods. |
nothing calls this directly
no test coverage detected