* Internal templated helper to return the size in bytes of a list-like type. * @param storage The storage to find the size of * @param conv VarType type of variable that is used for calculating the size * @param cmd The SaveLoadType ware are saving/loading. */
| 1359 | * @param cmd The SaveLoadType ware are saving/loading. |
| 1360 | */ |
| 1361 | static size_t SlCalcLen(const void *storage, VarType conv, SaveLoadType cmd = SL_VAR) |
| 1362 | { |
| 1363 | assert(cmd == SL_VAR || cmd == SL_REF); |
| 1364 | |
| 1365 | const SlStorageT *list = static_cast<const SlStorageT *>(storage); |
| 1366 | |
| 1367 | int type_size = SlGetArrayLength(list->size()); |
| 1368 | int item_size = SlCalcConvFileLen(cmd == SL_VAR ? conv : (VarType)SLE_FILE_U32); |
| 1369 | return list->size() * item_size + type_size; |
| 1370 | } |
| 1371 | |
| 1372 | static void SlSaveLoadMember(SaveLoadType cmd, Tvar *item, VarType conv) |
| 1373 | { |
nothing calls this directly
no test coverage detected