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

Method _get_string

compat/resource_compat_binary.cpp:168–183  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

166}
167
168StringName ResourceLoaderCompatBinary::_get_string() {
169 uint32_t id = f->get_32();
170 if (id & 0x80000000) {
171 uint32_t len = id & 0x7FFFFFFF;
172 if ((int)len > str_buf.size()) {
173 str_buf.resize(len);
174 }
175 if (len == 0) {
176 return StringName();
177 }
178 f->get_buffer((uint8_t *)&str_buf[0], len);
179 return String::utf8(&str_buf[0], len);
180 }
181
182 return string_map[id];
183}
184
185Error ResourceLoaderCompatBinary::parse_variant(Variant &r_v) {
186 uint32_t prop_type = f->get_32();

Callers

nothing calls this directly

Calls 3

sizeMethod · 0.45
resizeMethod · 0.45
get_bufferMethod · 0.45

Tested by

no test coverage detected