| 1321 | } |
| 1322 | |
| 1323 | void ClearDescID(EntityDescription* desc) { |
| 1324 | EntityDescriptionField* edf = desc->GetEditableField(EDF_ID); |
| 1325 | if (edf) { |
| 1326 | edf->data.clear(); |
| 1327 | int null_id = -1; |
| 1328 | memwrite(&null_id, sizeof(int), 1, edf->data); |
| 1329 | } |
| 1330 | EntityDescriptionList& children = desc->children; |
| 1331 | for (auto& it : children) { |
| 1332 | ClearDescID(&it); |
| 1333 | } |
| 1334 | } |
| 1335 | |
| 1336 | void EntityDescriptionField::ReadInt(int* id) const { |
| 1337 | memread(id, sizeof(int), 1, data); |
no test coverage detected