MCPcopy Create free account
hub / github.com/DFHack/dfhack / ensure_data

Function ensure_data

library/include/modules/Persistence.h:111–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109 return (data_size() >= off + sz);
110 }
111 void ensure_data(size_t off, size_t sz = 0)
112 {
113 if (data_size() < off + sz)
114 {
115 val().resize(off + sz, '\x01');
116 }
117 }
118 template<size_t N>
119 uint8_t (&pdata(size_t off))[N]
120 {

Callers 1

Persistence.hFile · 0.85

Calls 2

data_sizeFunction · 0.85
resizeMethod · 0.45

Tested by

no test coverage detected