MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / beforeArray

Method beforeArray

src/simulate/bin_serializer.cpp:110–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108 verify(ti->dimSize);
109 }
110 virtual void beforeArray ( Array * pa, TypeInfo * ti ) override {
111 verify_hash(ti->hash);
112 if ( reading ) {
113 uint64_t newSize = 0;
114 load(newSize);
115 array_clear(*context, *pa, /*at*/nullptr);
116 array_resize(*context, *pa, newSize, getTypeBaseSize(ti), true, /*at*/nullptr);
117 } else {
118 save(pa->size);
119 }
120 }
121 virtual void beforeTable ( Table *, TypeInfo * ) override {
122 error("binary serialization of tables is not supported");
123 }

Callers

nothing calls this directly

Calls 3

array_clearFunction · 0.85
array_resizeFunction · 0.85
getTypeBaseSizeFunction · 0.85

Tested by

no test coverage detected