MCPcopy Create free account
hub / github.com/OpenMW/openmw / appendString

Function appendString

components/lua/serialization.cpp:64–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62 }
63
64 static void appendString(BinaryData& out, std::string_view str)
65 {
66 if (str.size() < 32)
67 out.push_back(SHORT_STRING_FLAG | char(str.size()));
68 else
69 {
70 appendType(out, SerializedType::LONG_STRING);
71 appendValue<uint32_t>(out, static_cast<uint32_t>(str.size()));
72 }
73 out.append(str.data(), str.size());
74 }
75
76 static void appendData(BinaryData& out, const void* data, size_t dataSize)
77 {

Callers 1

serializeFunction · 0.85

Calls 4

appendTypeFunction · 0.85
sizeMethod · 0.45
appendMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected