MCPcopy Create free account
hub / github.com/GDRETools/gdsdecomp / store_buffer

Method store_buffer

compat/file_access_encrypted_v3.cpp:231–247  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

229}
230
231bool FileAccessEncryptedv3::store_buffer(const uint8_t *p_src, uint64_t p_length) {
232 ERR_FAIL_COND_V_MSG(!writing, false, "File has not been opened in write mode.");
233 ERR_FAIL_COND_V(!p_src && p_length > 0, false);
234
235 if (pos < get_length()) {
236 for (uint64_t i = 0; i < p_length; i++) {
237 store_8(p_src[i]);
238 }
239 } else if (pos == get_length()) {
240 data.resize(pos + p_length);
241 for (uint64_t i = 0; i < p_length; i++) {
242 data.write[pos + i] = p_src[i];
243 }
244 pos += p_length;
245 }
246 return true;
247}
248
249void FileAccessEncryptedv3::flush() {
250 ERR_FAIL_COND_MSG(!writing, "File has not been opened in write mode.");

Callers 13

write_image_v2_to_binMethod · 0.45
rename_dependenciesMethod · 0.45
save_ustringFunction · 0.45
rename_dependenciesMethod · 0.45
write_variantMethod · 0.45
save_unicode_stringMethod · 0.45
saveMethod · 0.45
set_uidMethod · 0.45
load_embedded_imageMethod · 0.45
_closeMethod · 0.45
enter_tagMethod · 0.45

Calls 1

resizeMethod · 0.45

Tested by

no test coverage detected