MCPcopy Create free account
hub / github.com/Tencent/MMKV / writeRawData

Method writeRawData

Core/CodedOutputData.cpp:129–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

127}
128
129void CodedOutputData::writeRawData(const MMBuffer &data) {
130 size_t numberOfBytes = data.length();
131 if (m_position + numberOfBytes > m_size) {
132 auto msg = "m_position: " + to_string(m_position) + ", numberOfBytes: " + to_string(numberOfBytes) +
133 ", m_size: " + to_string(m_size);
134 throw out_of_range(msg);
135 }
136 memcpy(m_ptr + m_position, data.getPtr(), numberOfBytes);
137 m_position += numberOfBytes;
138}
139
140void CodedOutputData::writeRawVarint32(int32_t value) {
141 while (true) {

Callers 6

writeDataMethod · 0.95
doAppendDataWithKeyMethod · 0.80
doOverrideDataWithKeyMethod · 0.80
importFromMethod · 0.80
writeRootObjectMethod · 0.80
MMKV_OSX.cppFile · 0.80

Calls 1

to_stringFunction · 0.50

Tested by

no test coverage detected